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