Files
xen/tools/libxl/bash-completion
T
Olaf Hering 9eaf53f5a0 libxl: remove shebang from bash_completion helper
Fix rpmlint warning:

xen-tools.x86_64: W: sourced-script-with-shebang
/etc/bash_completion.d/xl.sh /bin/bash
This text file contains a shebang, but is meant to be sourced, not executed.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
2012-02-07 17:18:10 +00:00

21 lines
396 B
Plaintext

# Copy this file to /etc/bash_completion.d/xl.sh
_xl()
{
local IFS=$'\n,'
local cur opts xl
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
xl=xl
if [[ $COMP_CWORD == 1 ]] ; then
opts=`${xl} help 2>/dev/null | sed '1,4d' | awk '/^ [^ ]/ {print $1}' | sed 's/$/ ,/g'` && COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
fi
return 0
}
complete -F _xl -o nospace -o default xl