comparison contrib/bash_completion @ 1888:283d2ab1e020

Make bash_completion more robust for e.g. broken hgrc or old hg installations.
author Thomas Arendsen Hein <thomas@intevation.de>
date Sun, 12 Mar 2006 12:29:03 +0100
parents 913397c27cd8
children 5e7aff1b6ae1
comparison
equal deleted inserted replaced
1887:913397c27cd8 1888:283d2ab1e020
13 } 13 }
14 14
15 15
16 _hg_commands() 16 _hg_commands()
17 { 17 {
18 local commands="$("$hg" debugcomplete "$cur")" 18 local commands
19 commands="$("$hg" debugcomplete "$cur" 2>/dev/null)" || commands=""
19 COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$commands' -- "$cur")) 20 COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$commands' -- "$cur"))
20 } 21 }
21 22
22 _hg_paths() 23 _hg_paths()
23 { 24 {