Simple watch
wrapper for zsh that supports alias and completion.
Just watch <command> <args>
(press <Tab>
to complete):
# Watch the pods
watch kubectl get pod -n kube-system
# Use alias
watch kgpn kube-system
# With watch flags
watch -c -n1 -d -t kgp
-
Install
watch
(macOS only).brew install watch
-
Add
zsh-watch
to the plugins array in your zshrc file.-
Oh-My-Zsh
git clone https://github.com/Thearas/zsh-watch ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-watch # In your ~/.zshrc plugins=(... zsh-watch)
-
Zinit
# In your ~/.zshrc zinit light Thearas/zsh-watch
-
Zi
# In your ~/.zshrc zi light Thearas/zsh-watch
-
Manual
git clone https://github.com/Thearas/zsh-watch ~/path/to/zsh-watch # In your ~/.zshrc source ~/path/to/zsh-watch/zsh-watch.plugin.zsh
-
Use viddy instead of watch
:
# In your ~/.zshrc
export ZSH_WATCH=viddy
export ZSH_WATCH_FLAGS="-t -d -n1 --pty"