From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26889 invoked by alias); 4 Nov 2015 20:35:52 -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: 20898 Received: (qmail 17463 invoked from network); 4 Nov 2015 20:35:50 -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=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern_com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=PfpS8JEW4OT4Gq0Qi3Vpb0/VedVdsOevvnMPGhT1Ylo=; b=me47rBYBjluxdaCrUThoxH0txZFa7WTQMN8WepWLixY4K/9bt3vJZp1HEyIV9L5Eo7 R6ls6LYiNp2zhdK7rHN8/HP6moz11JiSQNqg9L3hb2ISWFUzI3QJ2joyVYoiTsu8Fxl1 hLyIL2w7Bup1NpmcaLF75nrtDyno+Qi8/kddKMFqtgs3YbWI53OushsbU9QHnrRxwM0A iiXJfVgSnQXfrq8nnfvtKcEr7BBCDmoRc63GklZ07Im/6F1hSMsBx+TbF/HlZwX5q9xF CxWuDnx28PwQmBT6f/vWMY3l0c67nZ41PKNViN/7uPoF1k061IIEilVf1Glc7nX//Pho Is9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=PfpS8JEW4OT4Gq0Qi3Vpb0/VedVdsOevvnMPGhT1Ylo=; b=MFe/Xn3jk01n7DuoeB+QtC8wqDvxqdToLhzF0P6agq5gFGQt+WGa+ny+uPnH4OfDak oe4Bfyq9P6nImqG0J7Hc1l4zzpJY3uPlCXFS/K688nLqJQhRWcarg0xCBpJ5tfnMUa9F NImE9R9DsnKJfAFK0T9Oqwga9SPE3Z6TseFrPSZuY8gJiVpu92axWSGmUJNPsrYVyZMT 7vlbn6+7kxKBegNZF0YVM5M9mO/CR9mVMFl7Ipw4eeAyVFMgeEVXOWV/4DoUSO1hOJKY eeLSnWFAGGKn03atQbm7PXK/nhmA13E1Zd0q2REhorpx2SUcr0dlT4hgw/nd4CtwWyEB PT2w== X-Gm-Message-State: ALoCoQmFThkJEPOoedTwQScPHmupfQbfz6/VBANMv9/lbpW5RCTsoLkqJhJ1EZU0cFXEDA/WEoRb X-Received: by 10.60.63.99 with SMTP id f3mr2334323oes.82.1446669348964; Wed, 04 Nov 2015 12:35:48 -0800 (PST) From: Bart Schaefer Message-Id: <151104123546.ZM20556@torch.brasslantern.com> Date: Wed, 4 Nov 2015 12:35:46 -0800 In-Reply-To: <563A4A75.1020009@eastlink.ca> Comments: In reply to Ray Andrews "two mysteries" (Nov 4, 10:12am) References: <563A4A75.1020009@eastlink.ca> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh Users Subject: Re: two mysteries MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Nov 4, 10:12am, Ray Andrews wrote: } } START_IDX=1+((idx-1)/page_hight)*page_hight } } ... it will work fine for days, then one Tuesday 'START_IDX' starts } throwing 'divide by zero' errors This would be because page_hight (sic) is zero, not because the type of START_IDX has changed. } START_IDX=$(( 1+((idx-1)/page_hight)*page_hight )) } } ... fixes it I suspect not really. Something else changed so that the "page" is no longer empty, or whatever. } playing with associative arrays, yesterday I had to single quote: } } varis 'array[value]' line456 5 } } ... but only with arrays--scalars were fine--or I got a message to the } effect that 'no values were matched'. Without the quotes, array[value] is being treated as a file glob, and is looking for a file named one of arrayv, arraya, arrayl, arrayu, arraye. The "no matches found" error is because none of those files exists. } In the same vein, if one of these 'zcurses' functions crashes, what the } docs say about the terminal being in a unstable state sure is true. } Things look fine, but, for example, history recall goes screwy. "stty sane" will often fix you up in this situation. It might also work to use "ttyctl -f" in your startup file (i.e., before any zcurses stuff is run) but I'm not sure that handles the case where a zsh builtin has itself messed up the terminal state.