From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 430 invoked by alias); 7 Oct 2016 09:03:54 -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: 39583 Received: (qmail 8703 invoked from network); 7 Oct 2016 09:03:54 -0000 X-Qmail-Scanner-Diagnostics: from ioooi.vinc17.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(92.243.22.117):SA:0(-2.6/5.0):. Processed in 0.469274 secs); 07 Oct 2016 09:03:54 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=RP_MATCHES_RCVD autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: vincent@vinc17.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at vinc17.net does not designate permitted sender hosts) Date: Fri, 7 Oct 2016 10:57:09 +0200 From: Vincent Lefevre To: zsh-workers@zsh.org Subject: Re: zsh generates invalid UTF-8 encoding in the history Message-ID: <20161007085709.GA7369@zira.vinc17.org> Mail-Followup-To: zsh-workers@zsh.org References: <20161005114848.GA1125@cventin.lip.ens-lyon.fr> <161006113112.ZM16191@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <161006113112.ZM16191@torch.brasslantern.com> X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/1.7.0-6807-vl-r91193 (2016-10-05) On 2016-10-06 11:31:12 -0700, Bart Schaefer wrote: > To unmetafy with the shell (including backslash-newline processing): > > () { fc -pa $HISTFILE $SAVEHIST && fc -rnl -1 1 } Thanks. Note that it is not clear in the man page whether the least recent starts at 0 or at 1. And when -r is used, whether one should use or the reverse. And how can one cleanly append history lines to a history file? I was using "cat some_file >> ~/.zhistory", which seems to work, but I suppose that there may be clashes if zsh thinks that some lines are already metafied. I can't see a way to do this, and perhaps there should be a new feature. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)