From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4400 invoked by alias); 10 Nov 2014 12:18:09 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19359 Received: (qmail 1586 invoked from network); 10 Nov 2014 12:18:06 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 X-AuditID: cbfec7f4-b7f6c6d00000120b-b7-5460acfb66b5 Date: Mon, 10 Nov 2014 12:18:02 +0000 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: How to add a 'non-escaped' tilde to the completion list Message-id: <20141110121802.6f9434c4@pwslap01u.europe.root.pri> In-reply-to: <20141110113136.34766361@pwslap01u.europe.root.pri> References: <1415617649.1260.4.camel@gmail.com> <20141110113136.34766361@pwslap01u.europe.root.pri> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphluLIzCtJLcpLzFFi42I5/e/4Fd3faxJCDO5t0rPYcXIlowOjx6qD H5gCGKO4bFJSczLLUov07RK4MvravzAW3GeteHTpOmMD4xaWLkZODgkBE4mJ2zYzQ9hiEhfu rWfrYuTiEBJYyihxcds6JiiHSeJk92RWkCoWAVWJuZcWgNlsAoYSUzfNZgSxRQREJZav2MwO YgsLuEhMbfgIZHNw8ArYS1zviAIJcwo4SOx79A6sREggVWL/6blgR/AL6Etc/fuJCeIIe4mZ V86AjeQVEJT4MfkeWA2zgJbE5m1NrBC2vMTmNW+ZJzAKzEJSNgtJ2SwkZQsYmVcxiqaWJhcU J6XnGuoVJ+YWl+al6yXn525ihITglx2Mi49ZHWIU4GBU4uH1+BIfIsSaWFZcmXuIUYKDWUmE d9ayhBAh3pTEyqrUovz4otKc1OJDjEwcnFINjAFN5gcZ65Z0yaaILuX4sUeaNbSNQXqTw7kW Bsn6bL5LR+d6+ievmNd2I27Rb+VHSTLTZMuT0kU2VZzcMN36IVPsW16m99bCUnNr5G8Z6/pL 8cx83/uI8++JwlVVQspZpbZnWnSc/odz8987v3NDteQJcynfZfZ7hYtDFzGr/QhZ3/46NuqL EktxRqKhFnNRcSIAr0sxBR8CAAA= On Mon, 10 Nov 2014 11:31:36 +0000 Peter Stephenson 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