mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2025-01-22 08:14:21 +00:00
Move dynamic fish completions to their own autogenerated files
This commit is contained in:
parent
605cf38719
commit
4a0732afbc
3
assets/default/fish/completions/colima.fish
Normal file
3
assets/default/fish/completions/colima.fish
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
if type -q colima
|
||||||
|
colima completion fish | source
|
||||||
|
end
|
3
assets/default/fish/completions/golangci-lint.fish
Normal file
3
assets/default/fish/completions/golangci-lint.fish
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
if type -q golangci-lint
|
||||||
|
golangci-lint completion fish | source
|
||||||
|
end
|
3
assets/default/fish/completions/kubectl.fish
Normal file
3
assets/default/fish/completions/kubectl.fish
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
if type -q kubectl
|
||||||
|
kubectl completion fish | source
|
||||||
|
end
|
3
assets/default/fish/completions/pipx.fish
Normal file
3
assets/default/fish/completions/pipx.fish
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
if type -q pipx
|
||||||
|
register-python-argcomplete --shell fish pipx | source
|
||||||
|
end
|
3
assets/default/fish/completions/scw.fish
Normal file
3
assets/default/fish/completions/scw.fish
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
if type -q scw
|
||||||
|
scw autocomplete script shell=fish | source
|
||||||
|
end
|
5
assets/default/fish/completions/yk.fish
Normal file
5
assets/default/fish/completions/yk.fish
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
complete --command yk --no-files
|
||||||
|
complete --command yk --arguments "(yk list)" --description "Credential to get TOTP for"
|
||||||
|
complete --command yk --old-option "debug" --description "enable debug logging"
|
||||||
|
complete --command yk --old-option "version" --description "print version and exit"
|
||||||
|
complete --command yk --old-option "set-password" --description "prompt for key password and store in system keychain"
|
@ -1,25 +0,0 @@
|
|||||||
function update_completions --description "Update completions for a command" --argument-names "target_command"
|
|
||||||
# Usage: update_completions kubectl completion fish
|
|
||||||
#
|
|
||||||
# This generates new completions, sources them, and then saves it to your
|
|
||||||
# user completions directory for future loading.
|
|
||||||
|
|
||||||
if not set -q target_command ; or [ -z "$target_command" ]
|
|
||||||
echo "Must pass some command to generate completions. eg: update_completions kubectl completion fish" 1>&2
|
|
||||||
return 1
|
|
||||||
end
|
|
||||||
|
|
||||||
set --local completion_dir "$HOME/.config/fish/completions"
|
|
||||||
if set -q XDG_CONFIG_HOME
|
|
||||||
set --local completion_dir "$XDG_CONFIG_HOME"
|
|
||||||
end
|
|
||||||
|
|
||||||
if [ "$target_command" = "register-python-argcomplete" ]
|
|
||||||
echo "Command was py $argv[-1]"
|
|
||||||
set target_command $argv[-1]
|
|
||||||
end
|
|
||||||
|
|
||||||
set --local completion_path "$completion_dir/$target_command.fish"
|
|
||||||
eval $argv[1..] | tee "$completion_path" | source
|
|
||||||
echo "Completions for $target_command generated, sourced, and stored in $completion_path for future shells" 1>&2
|
|
||||||
end
|
|
Loading…
x
Reference in New Issue
Block a user