From c6299acc2a68cef3c854978fd1a9cf699ccdb77e Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Mon, 16 Nov 2020 15:59:43 +0100 Subject: Linkview update --- .config/zsh/alias.zsh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to '.config/zsh') 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() { -- cgit v1.2.3