From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15065 invoked by alias); 12 Oct 2015 15:53:25 -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: 20743 Received: (qmail 19375 invoked from network); 12 Oct 2015 15:53:24 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,MISSING_HEADERS autolearn=no autolearn_force=no version=3.4.0 X-Authority-Analysis: v=2.1 cv=T/C1EZ6Q c=1 sm=1 tr=0 a=TDXRqai3AtB4qfuLBL55xA==:117 a=TDXRqai3AtB4qfuLBL55xA==:17 a=9cW_t1CCXrUA:10 a=N659UExz7-8A:10 a=SQovfiAXNCrwklS2p3UA:9 a=pILNOxqGKmIA:10 a=ELukSZayh1QA:10 Message-id: <561BD771.6000006@eastlink.ca> Date: Mon, 12 Oct 2015 08:53:21 -0700 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-version: 1.0 Cc: Zsh Users Subject: Re: subsitutions and beginning of lines. References: <561AB49A.4060801@eastlink.ca> <20151012022637.GB2464@tarsus.local2> In-reply-to: <20151012022637.GB2464@tarsus.local2> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit On 10/11/2015 07:26 PM, Daniel Shahaf wrote: > You could avoid parsing the line numbers (and unescaping the commands) > altogether by accessing the history differently: > % print -r - $history[1004] echo foo I could never get that to work with anything besides a single subscript. I'd expect it to drive like any other array but nothing seems to work: print -lr - $history[-5,-1] ... and the point of what I'm doing is to show a range.