From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25223 invoked by alias); 1 Jun 2011 19:21:36 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29428 Received: (qmail 11580 invoked from network); 1 Jun 2011 19:21:31 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at ntlworld.com designates 81.103.221.56 as permitted sender) Date: Wed, 1 Jun 2011 19:45:02 +0100 From: Peter Stephenson To: zsh-workers@zsh.org (Zsh hackers list) Subject: Re: PATCH: print -S uses lexical history Message-ID: <20110601194502.2c59c403@pws-pc.ntlworld.com> In-Reply-To: <110531232436.ZM11353@torch.brasslantern.com> References: <18618.1306874237@pws-pc.ntlworld.com> <110531232436.ZM11353@torch.brasslantern.com> X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Cloudmark-Analysis: v=1.1 cv=R50lirqlHffDPPkwUlkuVa99MrvKdVWo//yz83qex8g= c=1 sm=0 a=BZSUD-1TYSsA:10 a=uObrxnre4hsA:10 a=kj9zAlcOel0A:10 a=q2GGsy2AAAAA:8 a=NLZqzBF-AAAA:8 a=b93weN3mfTXFcgLlQusA:9 a=CjuIK1q_8ugA:10 a=I6wTmPyJxzYA:10 a=_dQi-Dcv4p4A:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 On Tue, 31 May 2011 23:24:36 -0700 Bart Schaefer wrote: > On May 31, 9:37pm, Peter Stephenson wrote: > } > } As we've had all the pain of the HIST_LEX_WORDS option, which almost no > } one is using, to split a history line into words using the lexical > } analyser, it's worth making this available directly using a relative of > } "print -s" imaginatively called "print -S". > > This is nice, but I have to ask ... why not just make the behavior of > "print -s" dependend on the current setting of the option? In what > circumstances would one wish to (be able to choose at the level of > individual commands to) have part of the history in lexed form and > part of it not? "print -s" allows you to pick your own words; the different arguments become the words in the history. "print -S", on the other hand, takes a single argument which is the entire command line that will be split. It didn't seem appropriate to me to change the behaviour of "print -s" to do automatic splitting. What would be a bit neater would be to be able to have the option for an option, i.e. -s with a variant rather than a completely separate option. But we don't have anything like that. -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/