Files
dotfiles/dot_config/fish/functions/gho.fish
T

24 lines
693 B
Fish

function gho
set -l vaults ~/Documents/Obsidian/Personal ~/Documents/Obsidian/Walletbase ~/Documents/Obsidian/Research
set -l selection (ghq list | fzf --prompt="repo: " --tiebreak=end \
--bind "tab:transform:if test \"\$FZF_PROMPT\" = 'repo: '
echo 'change-prompt(vault: )+reload(printf %s\n $vaults)'
else
echo 'change-prompt(repo: )+reload(ghq list)'
end")
or return
# Vault entries are absolute paths; ghq entries are host/user/repo
if string match -q '/*' -- $selection
cd $selection
else
cd (ghq root)/$selection
end
clear
if test -d .git
onefetch
end
end