zsh-users
 help / color / mirror / code / Atom feed
* completions quotation style
@ 2016-03-30  2:38 sergio
  0 siblings, 0 replies; 5+ messages in thread
From: sergio @ 2016-03-30  2:38 UTC (permalink / raw)
  To: Zsh Users

Hello,

how could I change the quotation style in the following example?

% cat<TAB>
ABC\ \ DEF  ZXC\ \ MNB

Something like -Q or --quoting-style in ls.

-- 
sergio


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: completions quotation style
  2016-03-30  2:52   ` sergio
@ 2016-03-30  3:06     ` Bart Schaefer
  0 siblings, 0 replies; 5+ messages in thread
From: Bart Schaefer @ 2016-03-30  3:06 UTC (permalink / raw)
  To: Zsh Users

On Tue, Mar 29, 2016 at 7:52 PM, sergio <mailbox@sergio.spb.ru> wrote:
>
>
> ok,
>
> % ls '/tmp/a/<TAB>
>
> works, but it's not what mean.

---------- Forwarded message ----------
From: Bart Schaefer <schaefer@brasslantern.com>
Date: Mon, Oct 24, 2011 at 9:40 AM
Subject: Re: Completed filenames quoted instead of escaped?
To: zsh-users@zsh.org


On Oct 23,  5:39pm, Peter Stephenson wrote:
} Subject: Re: Completed filenames quoted instead of escaped?
}
} On Sat, 22 Oct 2011 17:25:43 +0000 (UTC)
} Daniel <quite@hack.org> wrote:
} > I would like completed and expanded filenames to generally "be quoted"
} > instead\ of\ escaped. Would that be possible? If find that more readable.
}
} If you type " before a filename, it will be completed in double quotes
} and (when possible) another " added at the end.  It's not possible to
} configure it to add a double quote in front only when needed.

I seem to recall writing a widget that would insert a quote, then do
completion, and then if nothing changed remove the quote again.  Oh,
yes:

    Functions/Zle/quote-and-complete-word

Search the zsh-users archives for "completion;quote" and you should
find a couple of threads from 2010 discussing this.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: completions quotation style
  2016-03-30  0:17 ` Bart Schaefer
@ 2016-03-30  2:52   ` sergio
  2016-03-30  3:06     ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: sergio @ 2016-03-30  2:52 UTC (permalink / raw)
  To: zsh-users

On 30/03/16 03:17, Bart Schaefer wrote:
> On Mar 30,  1:46am, sergio wrote:
> }
> } how could I change the quotation style in the following example?
> 
> Type one of the kind of quote you want before you hit TAB.
> 

This works only for files in the currect directory, without path prefix:
% ls '<TAB>
ASD  LKJ/  KJA  ASD/
ABC  DEF   ZXC  MNB

but

% ls /tmp/a/'<TAB> # ' is removed as soon as I press <TAB>
ASD\ \ LKJ/  KJA\ \ ASD/
ABC\ \ DEF   ZXC\ \ MNB


ok,

% ls '/tmp/a/<TAB>

works, but it's not what mean.


I'd like to make this style permanent.


-- 
sergio


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: completions quotation style
  2016-03-29 22:46 sergio
@ 2016-03-30  0:17 ` Bart Schaefer
  2016-03-30  2:52   ` sergio
  0 siblings, 1 reply; 5+ messages in thread
From: Bart Schaefer @ 2016-03-30  0:17 UTC (permalink / raw)
  To: Zsh Users

On Mar 30,  1:46am, sergio wrote:
}
} how could I change the quotation style in the following example?

Type one of the kind of quote you want before you hit TAB.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* completions quotation style
@ 2016-03-29 22:46 sergio
  2016-03-30  0:17 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: sergio @ 2016-03-29 22:46 UTC (permalink / raw)
  To: Zsh Users

Hello,

how could I change the quotation style in the following example?

% cat<TAB>
ABC\ \ DEF  ZXC\ \ MNB

Something like -Q or --quoting-style in ls.

-- 
sergio


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-03-30  3:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-30  2:38 completions quotation style sergio
  -- strict thread matches above, loose matches on Subject: below --
2016-03-29 22:46 sergio
2016-03-30  0:17 ` Bart Schaefer
2016-03-30  2:52   ` sergio
2016-03-30  3:06     ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).