This adds the command `please` and the key binding `Ctrl+Shift+S`. Both of them are for executing the previous command with super user privileges.pull/742/head
parent
9539341e1e
commit
06c6f1eb60
@ -0,0 +1,5 @@
|
||||
alias please='sudo $(fc -ln -1)'
|
||||
|
||||
previous_command_with_sudo() { zle beginning-of-line; zle -U "sudo $(fc -ln -1)" }
|
||||
zle -N previous-command-with-sudo previous_command_with_sudo
|
||||
bindkey "^S" previous-command-with-sudo # Ctrl+Shift+S
|
Loading…
Reference in new issue