mirror of
https://github.com/ahmetb/kubectx.git
synced 2025-08-18 23:36:51 +00:00
fix: improve kubectx completion on fish (#269)
This commit is contained in:
parent
5aba9fa311
commit
8241576f28
@ -1,3 +1,10 @@
|
||||
# kubectx
|
||||
complete -f -c kubectx -a "- (kubectl config get-contexts --output='name')"
|
||||
|
||||
function __fish_kubectx_arg_number -a number
|
||||
set -l cmd (commandline -opc)
|
||||
test (count $cmd) -eq $number
|
||||
end
|
||||
|
||||
complete -f -c kubectx
|
||||
complete -f -x -c kubectx -n '__fish_kubectx_arg_number 1' -a "(kubectl config get-contexts --output='name')"
|
||||
complete -f -x -c kubectx -n '__fish_kubectx_arg_number 1' -a "-" -d "switch to the previous namespace in this context"
|
||||
|
Loading…
Reference in New Issue
Block a user