summaryrefslogtreecommitdiffstats
path: root/sdc-os-chef/scripts/k8s/etc/bash_completion.d/nsenter
diff options
context:
space:
mode:
authorAreli Fuss <af732p@att.com>2018-02-01 13:09:07 +0200
committerMichael Lando <ml636r@att.com>2018-02-06 17:57:29 +0000
commit471a29706bfc3ed50a6c66f96ee6575fc2e3087b (patch)
treecce1286f59676a2f7097cb34146cfa94940d65b4 /sdc-os-chef/scripts/k8s/etc/bash_completion.d/nsenter
parent00c6ec7d386bd27c7752cf86e4692669e8b850ab (diff)
Add K8S deployment above Vagrant
Set deployment manifest files and scripts for deploy SDC over Kubernetes inside Vagrant Preparation for OOM integration Change-Id: I1f54b95067538f42d2d68fa3366b512dc9134f43 Issue-ID: SDC-907 Signed-off-by: Areli Fuss <af732p@att.com>
Diffstat (limited to 'sdc-os-chef/scripts/k8s/etc/bash_completion.d/nsenter')
-rw-r--r--sdc-os-chef/scripts/k8s/etc/bash_completion.d/nsenter63
1 files changed, 63 insertions, 0 deletions
diff --git a/sdc-os-chef/scripts/k8s/etc/bash_completion.d/nsenter b/sdc-os-chef/scripts/k8s/etc/bash_completion.d/nsenter
new file mode 100644
index 0000000000..ad56f06e48
--- /dev/null
+++ b/sdc-os-chef/scripts/k8s/etc/bash_completion.d/nsenter
@@ -0,0 +1,63 @@
+_nsenter_module()
+{
+ local cur prev OPTS
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+ case $prev in
+ '-S'|'--uid')
+ COMPREPLY=( $(compgen -W "uid" -- $cur) )
+ return 0
+ ;;
+ '-G'|'--gid')
+ COMPREPLY=( $(compgen -W "gid" -- $cur) )
+ return 0
+ ;;
+ '-t'|'--target')
+ local PIDS
+ PIDS=$(cd /proc && echo [0-9]*)
+ COMPREPLY=( $(compgen -W "$PIDS" -- $cur) )
+ return 0
+ ;;
+ '-h'|'--help'|'-V'|'--version')
+ return 0
+ ;;
+ esac
+ case $cur in
+ '=')
+ # FIXME: --root and --wd should use get only
+ # directories as compgen output. If $cur is
+ # overwrote the same way as below in case segment
+ # for $prev the command-line will get mangled.
+ cur=${cur#=}
+ ;;
+ -*)
+ OPTS="
+ --all
+ --target
+ --mount=
+ --uts=
+ --ipc=
+ --net=
+ --pid=
+ --cgroup=
+ --user=
+ --setuid
+ --setgid
+ --preserve-credentials
+ --root=
+ --wd=
+ --no-fork
+ --help
+ --version
+ "
+ COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
+ return 0
+ ;;
+ esac
+ local IFS=$'\n'
+ compopt -o filenames
+ COMPREPLY=( $(compgen -f -- $cur) )
+ return 0
+}
+complete -F _nsenter_module nsenter