Whamcloud - gitweb
LU-13225 utils: bash completion for lfs and lctl
[fs/lustre-release.git] / lustre / scripts / bash-completion / lctl
deleted file mode 100644 (file)
index e471e18f053cf043a63591512460efbc8d041547..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,36 +0,0 @@
-_lctl()
-{
-       local cur prev words cword
-
-       COMPREPLY=()
-       # allow different versions of bash_completion to work
-       if declare -F _init_completion > /dev/null; then
-               # this provides more functionality, but is only in v2.x
-               _init_completion || return
-       else
-               # this is compatible with both v1.3 and v2.x
-               _get_comp_words_by_ref -n : cur prev words cword
-       fi
-
-       if [[ "$cword" == "1" ]]; then
-               COMPREPLY=( $( compgen -W '$(lctl --list-commands |
-                                            grep -v '^=')' -- "$cur" ) )
-               return 0
-       fi
-
-       case "${words[1]}" in
-       set_param|list_param|get_param)
-               local filter="s/=$//"
-               [[ "${words[1]}" == "set_param" ]] && filter="/[^=/]$/d"
-               mapfile -t COMPREPLY < <(
-                   lctl list_param -F "${cur#[\"\']}*" 2>/dev/null |
-                   sed -e "$filter" -e 's#/$#.#' \
-                       -e "s#^${cur//\*/[^.]*}#$cur#"
-                   )
-               compopt -o nospace
-
-               return 0
-               ;;
-       esac
-} &&
-complete -F _lctl lctl
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..1ee18ee19373f27d98dfed04cc39fbc16451db08
--- /dev/null
@@ -0,0 +1 @@
+lustre
\ No newline at end of file