3 ms·
Have a look at zsh, you can execute your current command as root quite easy. Put sudo-command-line() { [[ -z $BUFFER ]] && zle up-history [[ $BUF
by mrud 16y ago
Have a look at zsh, you can execute your current command as root quite easy. Put
sudo-command-line() {
[[ -z $BUFFER ]] && zle up-history
[[ $BUFFER != sudo\ * ]] && BUFFER="sudo $BUFFER"
}
zle -N sudo-command-line
bindkey "^Os" sudo-command-line
into your zshrc, enter the command and press ctrl+o s et voila ;0
For more cool stuff regarding zsh have a look at http://grml.org/zsh/ http://grml.org/zsh/ or for other nice keybindings http://grml.org/zsh/grmlzshrc.html http://grml.org/zsh/grmlzshrc.html
- pyre 16y agozle = zsh line editor (I doesn't use read-line it has it's own line editor)