debuggers.hg

view tools/libxl/bash-completion @ 22848:6341fe0f4e5a

Added tag 4.1.0-rc2 for changeset 9dca60d88c63
author Keir Fraser <keir@xen.org>
date Tue Jan 25 14:06:55 2011 +0000 (2011-01-25)
parents 9002641064d8
children
line source
1 #!/bin/bash
2 # Copy this file to /etc/bash_completion.d/xl.sh
4 _xl()
5 {
6 local IFS=$'\n,'
8 local cur opts xl
9 COMPREPLY=()
10 cur="${COMP_WORDS[COMP_CWORD]}"
11 xl=xl
13 if [[ $COMP_CWORD == 1 ]] ; then
14 opts=`${xl} help 2>/dev/null | sed '1,4d' | awk '{print $1}' | sed 's/$/ ,/g'` && COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
15 return 0
16 fi
18 return 0
19 }
21 complete -F _xl -o nospace -o default xl