mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-31 20:31:19 -03:00
Add default \es keybinding for "prepend sudo"
This commit is contained in:
committed by
Fabian Homborg
parent
e5fc8abefe
commit
0f802eaad8
8
share/functions/__fish_prepend_sudo.fish
Normal file
8
share/functions/__fish_prepend_sudo.fish
Normal 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
|
||||
Reference in New Issue
Block a user