diff options
author | Tom Willemse | 2013-11-27 01:50:33 +0100 |
---|---|---|
committer | Tom Willemse | 2013-11-27 01:50:33 +0100 |
commit | 4b8dc34b5d83c4cfd9b33f794147770aab0a4f73 (patch) | |
tree | 4177c9baca73095cbc8ba2588f4942f5c6546dd7 /.zsh/functions | |
parent | 1a1d110602b30196eb969b0fd5030297d33341cb (diff) | |
download | zsh-4b8dc34b5d83c4cfd9b33f794147770aab0a4f73.tar.gz zsh-4b8dc34b5d83c4cfd9b33f794147770aab0a4f73.zip |
Add insert-sudo command
Diffstat (limited to '.zsh/functions')
-rw-r--r-- | .zsh/functions/insert-sudo | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/.zsh/functions/insert-sudo b/.zsh/functions/insert-sudo new file mode 100644 index 0000000..4fc68e6 --- /dev/null +++ b/.zsh/functions/insert-sudo @@ -0,0 +1,5 @@ +# -*- mode: sh; -*- +# Copied and modified from +# http://zshwiki.org/home/code/zle/addsudoorpfexec +BUFFER="sudo $(history -n -1 -1)" +CURSOR=$#BUFFER |