~gpanders/dotfiles

ref: 5629911cfe9a2fc4e566bab14373aec451244000 dotfiles/fish/.config/fish/functions/__fish_prepend_sudo.fish -rw-r--r-- 263 bytes
5629911cGreg Anders Fix bash syntax error in 'note' command 1 year, 11 months ago
                                                                                
1
2
3
4
5
6
7
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