Add default \es keybinding for "prepend sudo"

This commit is contained in:
Greg Anders
2019-09-25 10:34:54 -06:00
committed by Fabian Homborg
parent e5fc8abefe
commit 0f802eaad8
2 changed files with 11 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
function __fish_prepend_sudo -d "Prepend 'sudo ' to the beginning of the current commandline"
set -l cmd (commandline -boc)
if test "$cmd[1]" != "sudo"
commandline -C 0
commandline -i "sudo "
commandline -f end-of-line
end
end