-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# AUTOCOMPLETION FOR FISH | ||
# Reference: https://fishshell.com/docs/current/completions.html | ||
|
||
# wt list: list all the available worktrees | ||
# | awk '{ print $1; }': grab the first column of the output | ||
# | tr "\n" " ": replace line break character with space to put the worktrees on single line | ||
# separated by space | ||
|
||
set list (wt list | awk '{ print $1; }' | tr "\n" " ") | ||
set opts "" | ||
|
||
for item in (string split " " "$list") | ||
set -a opts (basename -- "$item") | ||
end | ||
|
||
complete -c wt -f -a "$opts" |