mirror of
https://github.com/prdlk/dotfiles.git
synced 2026-11-02 19:32:43 +00:00
config(fish): add fish completions for cli tools
This commit is contained in:
1 parent
b1fb6ee6fb
commit
7db95c2076
48 files changed
+2241
No files matched your search
@@ -0,0 +1,23 @@
|
||||
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
|
||||
Reference in new issue
Block a user