fish: add sv shortcut

This commit is contained in:
lelgenio 2021-06-18 01:13:46 -03:00
parent cfebf6559a
commit 15747c3177
1 changed files with 13 additions and 1 deletions

View File

@ -170,12 +170,24 @@ function man -w man
_man $argv
end
################################################################
# sv
################################################################
function sv -w sv
set -l o (command sv $argv 2> /dev/null )
and printf "%s\n" $o
or sudo sv $argv
end
################################################################
# quickly edit dotfiles
################################################################
function edit-config
pushd "{{@@ parent_dir ( _dotdrop_dotpath ) @@}}"
pushd (dirname "$DOTDROP_CONFIG")
set -l dotfile (fd -HE .git | wdmenu)
test -n "$dotfile" || return 1
{{@@ editor @@}} "$dotfile"