Branches
Comments
[»]
error in apparix --shell-examples
by Ed - Jul 25th 2008 18:21:13
In this function there is an extra then, there is one on the end of line 5
and one on line 6. I removed the one on line 6 in my .bashrc to get it to
work.
1. function _apparix_aliases ()
2. { cur=$2
3. dir=$3
4. COMPREPLY=()
5. if let $(($COMP_CWORD == 1)); then
6. then
7. # Below will not complete on subdirectories. swap if so desired.
8. # COMPREPLY=( $( cat $HOME/.apparix{rc,expand} | grep
"j,.*$cur.*," | cut -f2 -d, ) )
9. COMPREPLY=( $( (cat $HOME/.apparix{rc,expand} | cut -f2 -d, ; ls -1p |
grep '/$' | tr -d /) | grep ".*$cur.*" ))
10. else
11. dir=`apparix --try-current-first -favour rOl $dir 2>/dev/null` ||
return 0
12. eval_compreply="COMPREPLY=( $(
13. cd "$dir"
14. \ls -d *$cur* | while read r
15. do
a. [[ -d "$r" ]] &&
b. [[ $r == *$cur* ]] &&
c. echo \"${r// /\\ }\"
16. done
17. ) )"
18. eval $eval_compreply
19. fi
20. return 0
21. }
[reply]
[top]
[»]
Re: error in apparix --shell-examples
by Stijn van Dongen - Jul 25th 2008 19:00:48
> In this function there is an extra then,
> there is one on the end of line 5 and
> one on line 6. I removed the one on line
> 6 in my .bashrc to get it to work.
> --snip--
Indeed. Thanks for the bug report. I've fixed it and released
a new apparix. In slightly bad form it has the exact same
version number and simply overwrites the buggy version.
-- 1 2 3 4 hoedje van papier
[reply]
[top]
|