FS#3835 - bash-completion, sed: -e expression #1, char 20: unterminated `s' command
Attached to Project:
Arch Linux
Opened by Benny Kjellgren (benny) - Wednesday, 25 January 2006, 10:01 GMT
Last edited by Dale Blount (dale) - Wednesday, 25 January 2006, 13:08 GMT
Opened by Benny Kjellgren (benny) - Wednesday, 25 January 2006, 10:01 GMT
Last edited by Dale Blount (dale) - Wednesday, 25 January 2006, 13:08 GMT
|
Details
completion of scp and ssh
sed: -e expression #1, char 20: unterminated `s' command |
This task depends upon
Closed by arjan timmerman (blaasvis)
Saturday, 25 March 2006, 16:51 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in bash-3.1-2
Saturday, 25 March 2006, 16:51 GMT
Reason for closing: Fixed
Additional comments about closing: fixed in bash-3.1-2
hosts=$( compgen -W "$( sed -ne "s/^[Hh][Oo][Ss][Tt]["$'\t '"]*\([^*?]*\)$/\1/p" ${config[@]} )" -- $ocur )
Here is the tail of the debug :
---
compgen -W "$( sed -ne "s/^[Hh][Oo][Ss][Tt][" "]*\([^*?]*\)$/\1/p" ${config[@]} )" -- $ocur
sed -ne "s/^[Hh][Oo][Ss][Tt][" "]*\([^*?]*\)$/\1/p" ${config[@]}
sed: -e expression #1, char 20: unterminated `s' command
---
I guess that the [" "] cause the error
//bennny
- hosts=$( compgen -W "$( sed -ne "s/^[Hh][Oo][Ss][Tt]["$'\t '"]*\([^*?]*\)$/\1/p" ${config[@]} )" -- $ocur )
+ hosts=$( compgen -W $( sed -ne "s/^[Hh][Oo][Ss][Tt]["$'\t '"]*\([^*?]*\)$/\1/p" ${config[@]} ) -- $ocur )
But I do not get "aliases" ("Host" in .ssh/config) when doing tab completion of 'ssh'.
//benny
hosts=$( sed -ne "s/^[Hh][Oo][Ss][Tt]["$'\t '"]*\([^*?]*\)$/\1/p" ${config[@]} )
hosts=$( compgen -W "$hosts" -- $ocur )
http://lists.gnu.org/archive/html/bug-bash/2006-01/msg00033.html
here is a patch, that solves this