From a39def555b5207819125fc36491fc375c4dc21e2 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 12 Nov 2020 15:31:46 +0100 Subject: New zsh function to edit scripts with fzf --- .config/zsh/alias.zsh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to '.config/zsh') diff --git a/.config/zsh/alias.zsh b/.config/zsh/alias.zsh index 79e62cb..5ce9d50 100644 --- a/.config/zsh/alias.zsh +++ b/.config/zsh/alias.zsh @@ -50,6 +50,12 @@ alias stopdocker='docker-machine stop docker-home' alias envdocker='eval `docker-machine env docker-home`' alias vimz='nvim $(fzf)' alias v='nvim $(fzf)' +vs() { + p=$(pwd) + cd "$HOME"/.local/bin || return + nvim $(fzf --preview='head -$FZF_PREVIEW_LINES {}') + cd $p +} pa() { if [ "$1" ]; then if cd "$HOME"/.local/packs/"$1"; then -- cgit v1.2.3