2024-11-04 04:37:29 +03:00
|
|
|
{ ... }: {
|
|
|
|
text = ''
|
|
|
|
# Watch command output with 2 seconds interval.
|
|
|
|
# Usage: w <COMMAND>
|
|
|
|
function w() {
|
|
|
|
if [[ "''${*}" = "" ]]; then
|
|
|
|
help w
|
|
|
|
return 2
|
|
|
|
fi
|
2024-04-06 03:03:58 +03:00
|
|
|
|
2024-11-04 04:37:29 +03:00
|
|
|
watch -n 2 "''${@}"
|
|
|
|
}
|
2024-04-06 03:03:58 +03:00
|
|
|
|
2024-11-04 04:37:29 +03:00
|
|
|
# Watch command output with minimal interval.
|
|
|
|
# Usage: ww <COMMAND>
|
|
|
|
function ww() {
|
|
|
|
if [[ "''${*}" = "" ]]; then
|
|
|
|
help ww
|
|
|
|
return 2
|
|
|
|
fi
|
2024-04-06 03:03:58 +03:00
|
|
|
|
2024-11-04 04:37:29 +03:00
|
|
|
watch -n 0 "''${@}"
|
|
|
|
}
|
2024-04-06 03:03:58 +03:00
|
|
|
|
2024-11-04 04:37:29 +03:00
|
|
|
# Autocomplete.
|
|
|
|
complete -F _autocomplete_nested w ww
|
|
|
|
'';
|
2024-04-06 03:03:58 +03:00
|
|
|
}
|