Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: How to add a 'non-escaped' tilde to the completion list



On Mon, 10 Nov 2014 11:31:36 +0000
Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> 
> > But unfortunately the
> > line '${HOME}*) w+=$(echo ${PA} | sed s"|${HOME}|~|") ;;' does not work
> > as intended. The tilde is always "escaped". So the output looks like:
> >   \~
> >   \~/folder
> > 
> > How can I remove the backslash.
> 
> I presume you mean it's escaped when it's inserted on the command line.
> 
> The short answer is you need to add the -Q flag to the compadd at the
> end of the function so that the name doesn't get quoted.

Ah, it's coming back a bit...  Try adding -f instead of -Q.  That tells
the system it's a file name, and I think that's good enough that it
knows tildes are special.

pws



Messages sorted by: Reverse Date, Date, Thread, Author