summaryrefslogtreecommitdiffstats
path: root/.config/zsh/alias.zsh
diff options
context:
space:
mode:
Diffstat (limited to '.config/zsh/alias.zsh')
-rw-r--r--.config/zsh/alias.zsh18
1 files changed, 17 insertions, 1 deletions
diff --git a/.config/zsh/alias.zsh b/.config/zsh/alias.zsh
index d65edd3..b779c07 100644
--- a/.config/zsh/alias.zsh
+++ b/.config/zsh/alias.zsh
@@ -54,7 +54,23 @@ alias v='nvim $(fzf --preview="head -$FZF_PREVIEW_LINES {}")'
vbi() {
p=$(pwd)
cd "$HOME"/.local/bin || return
- nvim $(fzf --preview='head -$FZF_PREVIEW_LINES {}')
+ sc=$(fzf --preview='head -$FZF_PREVIEW_LINES {}')
+ if [ ! "$sc" ]; then
+ cd $p
+ return
+ fi
+ nvim $sc
+ cd $p
+}
+vco() {
+ p=$(pwd)
+ cd "$HOME"/.config || return
+ sc=$(fzf --preview='head -$FZF_PREVIEW_LINES {}')
+ if [ ! "$sc" ]; then
+ cd $p
+ return
+ fi
+ nvim $sc
cd $p
}
pa() {