diff --git a/dotfiles/fish/alias.fish b/dotfiles/fish/alias.fish index 12b9435..16d8975 100644 --- a/dotfiles/fish/alias.fish +++ b/dotfiles/fish/alias.fish @@ -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"