Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
930f8645
Commit
930f8645
authored
May 05, 2015
by
Eric Paris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update bash completions
Because we updated cobra, we get a better set of bash completions
parent
1f702138
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
11 deletions
+17
-11
kubectl
contrib/completions/bash/kubectl
+17
-11
No files found.
contrib/completions/bash/kubectl
View file @
930f8645
...
...
@@ -4,7 +4,7 @@
__debug
()
{
if
[[
-n
${
BASH_COMP_DEBUG_FILE
}
]]
;
then
echo
"
$*
"
>>
${
BASH_COMP_DEBUG_FILE
}
echo
"
$*
"
>>
"
${
BASH_COMP_DEBUG_FILE
}
"
fi
}
...
...
@@ -75,6 +75,13 @@ __handle_reply()
fi
}
# The arguments should be in the form "ext1|ext2|extn"
__handle_filename_extension_flag
()
{
local
ext
=
"
$1
"
_filedir
"@(
${
ext
}
)"
}
__handle_flag
()
{
__debug
"
${
FUNCNAME
}
: c is
$c
words[c] is
${
words
[c]
}
"
...
...
@@ -297,10 +304,10 @@ _kubectl_create()
flags+
=(
"--filename="
)
flags_with_completion+
=(
"--filename"
)
flags_completion+
=(
"_
filedir '@(json|yaml|yml)'
"
)
flags_completion+
=(
"_
_handle_filename_extension_flag json|yaml|yml
"
)
two_word_flags+
=(
"-f"
)
flags_with_completion+
=(
"-f"
)
flags_completion+
=(
"_
filedir '@(json|yaml|yml)'
"
)
flags_completion+
=(
"_
_handle_filename_extension_flag json|yaml|yml
"
)
flags+
=(
"--help"
)
flags+
=(
"-h"
)
...
...
@@ -322,10 +329,10 @@ _kubectl_update()
flags+
=(
"--filename="
)
flags_with_completion+
=(
"--filename"
)
flags_completion+
=(
"_
filedir '@(json|yaml|yml)'
"
)
flags_completion+
=(
"_
_handle_filename_extension_flag json|yaml|yml
"
)
two_word_flags+
=(
"-f"
)
flags_with_completion+
=(
"-f"
)
flags_completion+
=(
"_
filedir '@(json|yaml|yml)'
"
)
flags_completion+
=(
"_
_handle_filename_extension_flag json|yaml|yml
"
)
flags+
=(
"--help"
)
flags+
=(
"-h"
)
flags+
=(
"--patch="
)
...
...
@@ -351,10 +358,10 @@ _kubectl_delete()
flags+
=(
"--cascade"
)
flags+
=(
"--filename="
)
flags_with_completion+
=(
"--filename"
)
flags_completion+
=(
"_
filedir '@(json|yaml|yml)'
"
)
flags_completion+
=(
"_
_handle_filename_extension_flag json|yaml|yml
"
)
two_word_flags+
=(
"-f"
)
flags_with_completion+
=(
"-f"
)
flags_completion+
=(
"_
filedir '@(json|yaml|yml)'
"
)
flags_completion+
=(
"_
_handle_filename_extension_flag json|yaml|yml
"
)
flags+
=(
"--grace-period="
)
flags+
=(
"--help"
)
flags+
=(
"-h"
)
...
...
@@ -575,10 +582,10 @@ _kubectl_stop()
flags+
=(
"--all"
)
flags+
=(
"--filename="
)
flags_with_completion+
=(
"--filename"
)
flags_completion+
=(
"_
filedir '@(json|yaml|yml)'
"
)
flags_completion+
=(
"_
_handle_filename_extension_flag json|yaml|yml
"
)
two_word_flags+
=(
"-f"
)
flags_with_completion+
=(
"-f"
)
flags_completion+
=(
"_
filedir '@(json|yaml|yml)'
"
)
flags_completion+
=(
"_
_handle_filename_extension_flag json|yaml|yml
"
)
flags+
=(
"--grace-period="
)
flags+
=(
"--help"
)
flags+
=(
"-h"
)
...
...
@@ -942,10 +949,9 @@ _kubectl()
__start_kubectl
()
{
local
cur prev words cword
split
local
cur prev words cword
_init_completion
-s
||
return
local
completions_func
local
c
=
0
local
flags
=()
local
two_word_flags
=()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment