share/completions/apropos.fish needs one of its `$' signs (the one
signifying end of line rather than being part of `$str') to be escaped,
to fix the following:

  > apropos fis<TAB>fish: The '$' character begins a variable name. The 
character '/', which directly followed a '$', is not allowed
  as a part of a variable name, and variable names may not be zero characters 
long. To learn more about variable
  expansion in fish, type 'help expand-
  /usr/share/fish/completions/apropos.fish (line 6):              apropos 
$str|sed -e "s/^\(.*$str\([^ ]*\).*\)$/$str\2"\t"\1/"
                                                                                
         ^
  in function '__fish_complete_apropos',
          called on standard input,
  
  in command substitution
          called on standard input,

I found this within the first few minutes of playing with fish.

[Admittedly, that's not because I often use `apropos', but because I was
 wondering where the command descriptions in tab completion come from,
 and I hypothesized that they were from apropos.]

fish is (I suppose) targetted at newbies and other non-computer-experts,
who might be somewhat intimidated by error reports such as the above
(especially with its lines continuing past the width of the window, and
the `^' indicator that doesn't actually point at the `$' causing the
problem).

There are currently 145 files in share/completion, and I suppose these
will continue to be changed and added to (as evidenced by item 2 of
http://roo.no-ip.org/fish/user_doc/index.html#todo-features).

Is there any form of automated testing that can be done for these files,
to reduce the chance of similar bugs in future?

Unfortunately, this particular bug wouldn't have been caught by the red
syntax highlighting (at least not in 1.12.5).  Nevertheless, having
`make check' check that all .fish files are free of problems that would be
marked with red syntax highlighting would be an excellent first step in
reducing the likelihood that such bugs reach the user.

pjrm.  (Not subscribed to fish-users.)


-------------------------------------------------------
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