From 9b6b81a4ecbf0225d7bce6e4e86620c5c5b4b595 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Tue, 17 Aug 2021 17:07:07 +0200 Subject: update --- .config/zsh/alias.zsh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.config/zsh/alias.zsh b/.config/zsh/alias.zsh index 749645f..939c0e8 100644 --- a/.config/zsh/alias.zsh +++ b/.config/zsh/alias.zsh @@ -100,15 +100,9 @@ vimconf() { cd $p } pa() { - if [ "$1" ]; then - if cd "$HOME"/.local/packs/"$1"; then - ls - else - cd "$HOME"/.local/packs && ls - fi - else - cd "$HOME"/.local/packs && ls - fi + if [ -d $HOME/.local/packs ] && cd $HOME/.local/packs || return 1 + dir=$(\ls $HOME/.local/packs | fzf) + [ -z $dir ] && return || cd $dir } co() { if [ "$1" ]; then -- cgit v1.2.3