From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29776 invoked by alias); 25 Sep 2010 17:33:51 -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: 28298 Received: (qmail 15835 invoked from network); 25 Sep 2010 17:33:48 -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,DKIM_SIGNED, DKIM_VALID,HTML_MESSAGE,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 74.125.82.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=GE+VHJd8Zvb4zGhFy2fNQ97hu+DKkD1WlrDlE30YYL8=; b=J6aW69X0blxWKvq6fKfwxF6VM8YnwwTGBtUMUMygKnnwoM/uxU2ytBH/JyHR4MBFdi OQyYUuoJsjYWyvUtG+ggAa4MQhEi+eAbYNJ8RKCGCOQYl+Bly4ehJsTeh6YmJGTAV0Jj eAJ6LBZ84zx9WCg2aYzQCLHw+YPRSayQKYMr4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=ZSdBhM1fUSonXfVnte/uNy+BSZGe8s5i/EnZMimE43NQ7F56W/4/cvKRDWI8LvrSgb 6nQ4Wh5zue8bILyGj9zkbFYzukaIvolAtP9NJ3uF/ZqJKbZeoj988ruYLvfu/Qeesi/A rdYbiB0WptZgDika6d7NiAwIg15auKP+sTp0w= MIME-Version: 1.0 Sender: 4wayned@gmail.com In-Reply-To: <100924235332.ZM5186@torch.brasslantern.com> References: <20100924133936.245765b2@pwslap01u.europe.root.pri> <100924081042.ZM4496@torch.brasslantern.com> <20100924211247.626449fb@pws-pc> <100924235332.ZM5186@torch.brasslantern.com> Date: Sat, 25 Sep 2010 10:26:28 -0700 X-Google-Sender-Auth: C_CDAmK3lToDhKD6PS1iiJyZyVg Message-ID: Subject: Re: !!$ unitialized at first prompt From: Wayne Davison To: Bart Schaefer Cc: Zsh Workers Content-Type: multipart/alternative; boundary=000e0cd402c4a9917f049118cb0b --000e0cd402c4a9917f049118cb0b Content-Type: text/plain; charset=UTF-8 It might be nice to introduce a new history format that would indicate the word splitting in a simple manner. One possibility is to output all spaces inside a word as some other sequence of characters. If the new encoding were indicated in the prefixed extended-history header, the parsing code would know if it should split the line based on the new, simple decoder or the old-style parser. One complicating factor is a syntax that splits into separate words without intervening spaces. To deal with that we'd either need a character sequence to indicate this, or we'd need to still run the line through the parser before decoding the words. Here's one possible encoding would use URI encoding to fully encode all the history semantics of the line. I'm indicating its presence with a ":%" in the prefix, like this: : 1226351062:0:%;cat file%20name%20with%20spaces%20(100%25) >%00/tmp/file%20name In the above, I indicated a word-split that didn't have a space with a null (%00), so the above is 4 words. The idea is to come up with an encoding that directly translates between the internal representation and a hist-text representation. Would we need more encoding rules? Maybe something for metafied chars? ..wayne.. --000e0cd402c4a9917f049118cb0b--