fish: add sv shortcut
This commit is contained in:
parent
cfebf6559a
commit
15747c3177
|
@ -170,12 +170,24 @@ function man -w man
|
||||||
_man $argv
|
_man $argv
|
||||||
end
|
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
|
# quickly edit dotfiles
|
||||||
################################################################
|
################################################################
|
||||||
|
|
||||||
function edit-config
|
function edit-config
|
||||||
pushd "{{@@ parent_dir ( _dotdrop_dotpath ) @@}}"
|
pushd (dirname "$DOTDROP_CONFIG")
|
||||||
set -l dotfile (fd -HE .git | wdmenu)
|
set -l dotfile (fd -HE .git | wdmenu)
|
||||||
test -n "$dotfile" || return 1
|
test -n "$dotfile" || return 1
|
||||||
{{@@ editor @@}} "$dotfile"
|
{{@@ editor @@}} "$dotfile"
|
||||||
|
|
Reference in New Issue