This repository has been archived on 2024-03-04. You can view files and clone it, but cannot push or open issues or pull requests.
linux/.config/bash/module/watch.sh
2023-12-07 04:06:05 +03:00

25 lines
373 B
Bash

# Watch command output with 2 seconds interval.
# Usage: w <COMMAND>
function w() {
if [[ "${*}" = "" ]]; then
help w
return 2
fi
watch -n 2 "${@}"
}
# Watch command output with minimal interval.
# Usage: ww <COMMAND>
function ww() {
if [[ "${*}" = "" ]]; then
help ww
return 2
fi
watch -n 0 "${@}"
}
# autocomplete.
complete -F _autocomplete_nested w ww