On 9/7/06, Martin Bähr <[EMAIL PROTECTED]> wrote:
> i just stumbled accross this:
>
> > cd -
> fish: Invalid index valueInvalid index value
> /usr/share/fish/functions/__fish_move_last.fish (line 22):      set -e (echo 
> $src)[$size_src]
>                                                                           ^
> in function #__fish_move_last#,
>         called on line 29 of file #/usr/share/fish/functions/prevd.fish#,
>         with parameter list #dirprev dirnext#
>
> in function #prevd#,
>         called on line 20 of file #/usr/share/fish/functions/cd.fish#,
>
> in function #cd#,
>         called on standard input,
>         with parameter list #-#


I can reproduce this and I've located the error. It was caused by the
new syntax allowing you to slice the output of a command substiution
as an array. The code was trying to erase the value at index $size_src
from the array whose name is specified by $src using the code

set -e (echo $src)[$size_src]

but fish of course tries to slice the output of 'echo $src' instead.
The solution was to simply add a backslash to the '[' to tell fish
that it should be interpreted as a literal bracket:

set -e (echo $src)\[$size_src]

Fix is in the darcs tree.

Thank you for the report.

>
> greetings, martin.
> --
> cooperative communication with sTeam      -     caudium, pike, roxen and unix
> offering: programming, training and administration   -  anywhere in the world
> --
> pike programmer   travelling and working in europe             open-steam.org
> unix system-      bahai.or.at                        iaeste.(tuwien.ac|or).at
> administrator     (caudium|gotpike).org                          is.schon.org
> Martin Bähr       http://www.iaeste.or.at/~mbaehr/
>

-- 
Axel

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to