File tree Expand file tree Collapse file tree 1 file changed +3
-17
lines changed Expand file tree Collapse file tree 1 file changed +3
-17
lines changed Original file line number Diff line number Diff line change 4
4
# oh-my-zsh compatible plugins.
5
5
6
6
KUBECTX_DIR=" $( dirname $0 ) /kubectx"
7
- OH_MY_ZSH_DIR =" $( dirname $0 ) /../../.. "
7
+ COMPLETION_DIR =" ${KUBECTX_DIR} /completion "
8
8
export PATH=${PATH} :${KUBECTX_DIR}
9
9
10
- if [[ ! -f " ${KUBECTX_DIR} /completion /kubectx.zsh" ]]; then
10
+ if [[ ! -f " ${COMPLETION_DIR} /kubectx.zsh" ]]; then
11
11
pushd " $KUBECTX_DIR "
12
12
git submodule init
13
13
git submodule update
14
14
popd
15
15
fi
16
16
17
- function loadCompletions()
18
- {
19
- COMPLETION_DIR=" ${OH_MY_ZSH_DIR} /completions"
20
- if [ ! -d ${COMPLETION_DIR} ]; then # Check if completion directory exists
21
- mkdir -p ${COMPLETION_DIR}
22
- chmod -R 755 ${COMPLETION_DIR}
23
- fi
24
- ZSH_COMPLETION_FILE=" ${COMPLETION_DIR} /_kubectx.zsh"
25
- if [ ! -f ${ZSH_COMPLETION_FILE} ]; then # Check if zsh completion file exists
26
- ln -s ${KUBECTX_DIR} /completion/kubectx.zsh ${ZSH_COMPLETION_FILE}
27
- ln -s ${KUBECTX_DIR} /completion/kubens.zsh ${COMPLETION_DIR} /_kubens.zsh
28
- fi
29
- }
30
-
31
17
# Load completions
32
- loadCompletions
18
+ fpath=( $COMPLETION_DIR $fpath )
You can’t perform that action at this time.
0 commit comments