comparison contrib/bash_completion @ 952:dbfabfcb485e

bash_completion: support GNU sed 3 and non-GNU sed replaced command 'Q' introduced in GNU sed 4, in order to support platforms with older sed.
author TK Soh <teekaysoh@yahoo.com>
date Fri, 19 Aug 2005 06:04:46 +0100
parents 925563ff1b18
children 52d8d81e72ad
comparison
equal deleted inserted replaced
951:859de3ebc041 952:dbfabfcb485e
1 _hg_commands() 1 _hg_commands()
2 { 2 {
3 local commands="$(hg -v help | sed -e '1,/^list of commands:/d' \ 3 local commands="$(hg -v help | sed -e '1,/^list of commands:/d' \
4 -e '/^global options:/Q' \ 4 -e '/^global options:/,$d' \
5 -e '/^ [^ ]/!d; s/[,:]//g;')" 5 -e '/^ [^ ]/!d; s/[,:]//g;')"
6 6
7 # hide debug commands from users, but complete them if 7 # hide debug commands from users, but complete them if
8 # specifically asked for 8 # specifically asked for
9 if [[ "$cur" == de* ]]; then 9 if [[ "$cur" == de* ]]; then