[darcs-users] Bash completion - fixed!
Daniel Carrera
daniel.carrera at zmsl.com
Sat Dec 3 00:29:51 UTC 2005
Hi all,
Thanks to all who helped. I found the problem (finally!). The bash
completion script was calling `darcs --commands` to get a list of
options. It turns out that, at least on my system, this command gives
you a very incomplete list:
$ darcs --commands
initialize
get
changes
--help
--version
--exact-version
--extended-help
That's why 'record', 'unrecord', etc were not working. I fixed this by
adding a new function that simply echoes all the darcs options, and
calling that function instead of `darcs --commands`:
_darcs_commands()
{
echo initialize
echo get
echo add
echo remove
echo mv
echo replace
echo record
echo pull
...
}
[snip]
- COMPREPLY=( $( darcs --commands | grep "^$cur" ) )
+ COMPREPLY=( $( _darcs_commands | grep "^$cur" ) )
It's strange that no one would notice this before. Maybe my darcs has a
broken --commands flag. Does the --commands flag work well for everyone
else but me?
Cheers,
Daniel.
--
/\/`) http://oooauthors.org
/\/_/ http://opendocumentfellowship.org
/\/_/
\/_/ I am not over-weight, I am under-tall.
/
More information about the darcs-users
mailing list