Skip to content

Commit

Permalink
fish: git_sw: Handle certain arguments to 'git switch'
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Chancellor <[email protected]>
  • Loading branch information
nathanchance committed Mar 15, 2024
1 parent b2c8866 commit aaeb29d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion fish/functions/git_sw.fish
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,18 @@

function git_sw -d "git switch with fzf"
if test (count $argv) -gt 0
set ref $argv
for arg in $argv
switch $arg
case -d --detach
set -a git_switch_args $arg
case '*'
set ref $arg
end
end
if not set -q ref
print_error "No ref supplied?"
return 1
end
else
set ref (git bf)
end
Expand Down

0 comments on commit aaeb29d

Please sign in to comment.