Update .config/fish/functions/hack.fish
This commit is contained in:
parent
2ac56d4351
commit
743dfe1ec1
1 changed files with 7 additions and 3 deletions
|
@ -1,8 +1,12 @@
|
||||||
#!/usr/bin/env fish
|
#!/usr/bin/env fish
|
||||||
|
|
||||||
function hack --description "Select a GH repo, [clone it], enter its directory"
|
function hack --description "Select a GH repo, [clone it], enter its directory" \
|
||||||
set -f repos $(gh repo list --no-archived --json name,description --jq '.[] | "\(.name) \u001b[1;30m\(.description)\u001b[0m"')
|
--argument-names repo
|
||||||
set -f repo $(gum filter --height 10 $repos | string split ' ')[1]
|
if ! set -q repo
|
||||||
|
set -f repos \
|
||||||
|
$(gh repo list --no-archived --json name,description --jq '.[] | "\(.name) \u001b[1;30m\(.description)\u001b[0m"')
|
||||||
|
set -f repo $(gum filter --height 10 $repos | string split ' ')[1]
|
||||||
|
end
|
||||||
|
|
||||||
set -f path "$HOME/hackin/$repo"
|
set -f path "$HOME/hackin/$repo"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue