From f0632827ae9f59ae9d03dc8607f0ee8e1f11847a Mon Sep 17 00:00:00 2001 From: earnest ma Date: Sun, 20 Feb 2022 18:22:21 -0500 Subject: [PATCH] aliases.sh: Update and remove old alias --- shell_common/.config/shell_common/aliases.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/shell_common/.config/shell_common/aliases.sh b/shell_common/.config/shell_common/aliases.sh index 603dc8e..7fbfe3e 100644 --- a/shell_common/.config/shell_common/aliases.sh +++ b/shell_common/.config/shell_common/aliases.sh @@ -15,14 +15,20 @@ ahbh(){ # I'm not sure if this works "$(git remote show origin | sed -n '/HEAD branch/s/.*: //p')"..."$(git branch --show-current)" } -# quickly cd into a ghq dir -cghq(){ - cd $(ghq root)/$(ghq list | grep "$1" | head -1) -} - # use fzf to cd into a ghq directory fghq(){ - cd $(ghq root)/$(ghq list | fzf) + cd $(ghq root)/$(ghq list | fzf) +} + +# use fzf to open a VSCodium project +fcode(){ + codium $(ghq root)/$(ghq list | fzf) +} + +# use fzf to open a file in $EDITOR or neovim +ffe() { + fname=$(fzf) || return + ${EDITOR:-nvim} "$fname" } alias ls='exa' # -ag