Skip to content

enrico9034/zsh-watch-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

WATCH

Easily prefix your current or previous commands with watch by pressing Alt + w

  1. Clone this repository into $ZSH_CUSTOM/plugins (by default ~/.oh-my-zsh/custom/plugins)
git clone https://github.com/enrico9034/watch-plugin-zsh.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/watch
  1. To use it, add watch to the plugins array in your zshrc file:
plugins=(... watch)
  1. Start a new terminal session.

Usage

Current typed commands

Say you have typed a long command and forgot to add watch in front:

$ kubectl get pod -n namespace

By pressing the Alt + w key, you will have the same command with watch prefixed without typing:

$ watch kubectl get pod -n namespace

Previous executed commands

Say you want to delete a system file and denied:

$ kubectl get pod -n namespace
$

By pressing the Alt + w key, you will have the same command with watch prefixed without typing:

$ rm some-system-file.txt
$
$ kubectl get pod -n namespace
$

This plugin is based on official sudo plugin

sudo official plugin: https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/sudo

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages