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
86b8a09c
Commit
86b8a09c
authored
Apr 23, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #24670 from sttts/sttts-zsh-completion-gnu-sed
Automatic merge from submit-queue Add word boundary support for GNU sed in zsh completion
parents
de9c1a2a
0d6d0a56
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
kubectl
contrib/completions/zsh/kubectl
+16
-7
No files found.
contrib/completions/zsh/kubectl
View file @
86b8a09c
...
...
@@ -139,17 +139,26 @@ __kubectl_quote() {
autoload
-U
+X compinit
&&
compinit
autoload
-U
+X bashcompinit
&&
bashcompinit
# use word boundary patterns for BSD or GNU sed
LWORD
=
'[[:<:]]'
RWORD
=
'[[:>:]]'
if
sed
--help
2>&1 |
grep
-q
GNU
;
then
LWORD
=
'\<'
RWORD
=
'\>'
fi
__kubectl_bash_source <
(
sed
\
-e
's/declare -F/whence -w/'
\
-e
's/local \([a-zA-Z0-9_]*\)=/local \1; \1=/'
\
-e
's/flags+=("\(--.*\)=")/flags+=("\1"); two_word_flags+=("\1")/'
\
-e
's/must_have_one_flag+=("\(--.*\)=")/must_have_one_flag+=("\1")/'
\
-e
's/[[:<:]]_filedir[[:>:]]/__kubectl_filedir/g'
\
-e
's/[[:<:]]_get_comp_words_by_ref[[:>:]]/__kubectl_get_comp_words_by_ref/g'
\
-e
's/[[:<:]]__ltrim_colon_completions[[:>:]]/__kubectl_ltrim_colon_completions/g'
\
-e
's/[[:<:]]compgen[[:>:]]/__kubectl_compgen/g'
\
-e
's/[[:<:]]compopt[[:>:]]/__kubectl_compopt/g'
\
-e
's/[[:<:]]declare[[:>:]]/__kubectl_declare/g'
\
-e
's/\$(type[[:>:]]/$(__kubectl_type/g'
\
-e
"s/
${
LWORD
}
_filedir
${
RWORD
}
/__kubectl_filedir/g"
\
-e
"s/
${
LWORD
}
_get_comp_words_by_ref
${
RWORD
}
/__kubectl_get_comp_words_by_ref/g"
\
-e
"s/
${
LWORD
}
__ltrim_colon_completions
${
RWORD
}
/__kubectl_ltrim_colon_completions/g"
\
-e
"s/
${
LWORD
}
compgen
${
RWORD
}
/__kubectl_compgen/g"
\
-e
"s/
${
LWORD
}
compopt
${
RWORD
}
/__kubectl_compopt/g"
\
-e
"s/
${
LWORD
}
declare
${
RWORD
}
/__kubectl_declare/g"
\
-e
"s/
\\\$
(type
${
RWORD
}
/
\$
(__kubectl_type/g"
\
$(
dirname
$0
)
/../bash/kubectl
)
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