diff options
Diffstat (limited to 'config/shell/functions')
| -rw-r--r-- | config/shell/functions | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/config/shell/functions b/config/shell/functions new file mode 100644 index 0000000..a300316 --- /dev/null +++ b/config/shell/functions @@ -0,0 +1,16 @@ +gvc() { + if [[ $1 == "clone" ]]; then + shift + git clone git@git.venomade.com:"$@" + else + ssh git@git.venomade.com "$@" + fi +} + +function y() { + local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd + command yazi "$@" --cwd-file="$tmp" + IFS= read -r -d '' cwd < "$tmp" + [ "$cwd" != "$PWD" ] && [ -d "$cwd" ] && builtin cd -- "$cwd" + rm -f -- "$tmp" +} |
