Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: two mysteries
- X-seq: zsh-users 20898
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: two mysteries
- Date: Wed, 4 Nov 2015 12:35:46 -0800
- 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==
- In-reply-to: <563A4A75.1020009@eastlink.ca>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <563A4A75.1020009@eastlink.ca>
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author