[ putting the bash completion mailing-list in CC: ]
On Sat, Oct 16, 2010 at 04:21:21PM +0200, Marek D. wrote:
> Hi,
> I tried to use tc completition and:
> and after tc and tab I've got:
Hi,
this "attempt" is now more than a year old.
But I don't currently use 'tc' nor I expect any exhaustive or bug-free
version anytime soon.
>
> tc bash: return: -1: invalid option
> return: usage: return [n]
You may also want to use set -x in order to get more meaningful
backtraces.
I think you're not doing anything wrong so far.
I don't remember having had this problem. While it would be surprising
that bash recently changed its tolerance for returning signed integer.
-1 = 255, I attached a patch(1).
>
> Please, let me know what I do wrong.
>
> cat /proc/version
> Linux version 2.6.32-5-686 (Debian 2.6.32-23) ([email protected])
> (gcc version 4.3.5 (Debian 4.3.5-3) ) #1 SMP Sat Sep 18 02:14:45 UTC
> 2010
The "bash" and "bash-completion" packages versions would have been
important here.
>
> Best regards,
> Marek D.
if there are concerns related to bash/bash-completion compatibility,
I may look at them in the comings weeks.
bye
Raphaƫl D.
--- tc.old 2009-06-03 10:28:19.000000000 +0200
+++ tc 2010-10-16 23:49:56.009024600 +0200
@@ -46,7 +46,7 @@
# optionnal start and end position
# return the position or -1 if not found
_tc_get_arg_matching() {
- [ -z "$1" ] && return -1
+ [ -z "$1" ] && return 255
local i aarg limit start a
limit=$COMP_CWORD
start=1
@@ -72,7 +72,7 @@
return $i
((i++))
done
- return -1
+ return 255
}
# returns 0 if the argument is found in the cmdline
_______________________________________________
Bash-completion-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-devel