From a347469e36936a6a2989f6422c70f8f7bbbbbe0c Mon Sep 17 00:00:00 2001 From: juancwu <46619361+juancwu@users.noreply.github.com> Date: Tue, 20 Dec 2022 02:33:54 -0500 Subject: [PATCH] update(fish): update configuration to work with new repo organization --- .config/fish/config.fish | 2 +- .config/fish/functions/peco_change_directory.fish | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.config/fish/config.fish b/.config/fish/config.fish index f11626e..f9011ae 100644 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -38,8 +38,8 @@ if type -q git alias gc "git commit" alias gs "git status" alias gp "git push" + alias gP "git pull --rebase" alias ga "git add" - alias gx "git stash" end # allow local config overwrite diff --git a/.config/fish/functions/peco_change_directory.fish b/.config/fish/functions/peco_change_directory.fish index a2d5c17..ec1a5cd 100644 --- a/.config/fish/functions/peco_change_directory.fish +++ b/.config/fish/functions/peco_change_directory.fish @@ -16,9 +16,11 @@ end function peco_change_directory begin echo $HOME/.config - ghq list -p + # ghq list -p # gh cli replaced this, so it is no longer needed + # list local repositories + find $HOME/ghq -mindepth 2 -maxdepth 2 -type d # home directory - ls -ad $HOME/* | grep -v \.git + ls -ad $HOME/*/ | grep -v \.git # current directory ls -ad */ | perl -pe "s#^#$PWD/#" | grep -v \.git end | sed -e 's/\/$//' | awk '!a[$0]++' | _peco_change_directory $argv