Welcome,
do
$ set | less and search for "\s\~\S"
in function
__expand_tilde_by_ref ()
we have
eval $1=$(printf ~%q "${!1#\~}");
should be
eval $1=$(printf \~%q "${!1#\~}");
in function
_expand ()
we have
_tilde "$cur" || eval COMPREPLY[0]=$(printf ~%q "${COMPREPLY[0]#\~}");
should be
_tilde "
Welcome,
telling the true a second "~" needs "\" too, so the function should be defined
as
_quote_readline_by_ref ()
{
case $1 in
'')printf -v $2 %s "$1";;
\'*)printf -v $2 %s "${1:1}";;
\~*)printf -v $2 \~%q "${1:1}";;
?*)p
2 matches
Mail list logo