From f7ce5878b8b8976ba81ae6090e12aeab1f8c6f27 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Wed, 2 May 2012 13:30:33 +0000 Subject: 30425 (fixed): Add localhistory/globalhistory to $ZLE_STATE as set by the set-local-history zle widget --- Doc/Zsh/zle.yo | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'Doc/Zsh/zle.yo') diff --git a/Doc/Zsh/zle.yo b/Doc/Zsh/zle.yo index bfbddc7d1..3e8c25a90 100644 --- a/Doc/Zsh/zle.yo +++ b/Doc/Zsh/zle.yo @@ -908,11 +908,20 @@ item(tt(ZLE_STATE) (scalar))( Contains a set of space-separated words that describe the current tt(zle) state. -Currently, the only state shown is the insert mode as set by the -tt(overwrite-mode) or tt(vi-replace) widgets. The string contains -`tt(insert)' if characters to be inserted on the command line move existing -characters to the right, `tt(overwrite)' if characters to be inserted -overwrite existing characters. +Currently, the states shown are the insert mode as set by the +tt(overwrite-mode) or tt(vi-replace) widgets and whether history commands +will visit imported entries as controlled by the set-local-history widget. +The string contains `tt(insert)' if characters to be inserted on the +command line move existing characters to the right or `tt(overwrite)' +if characters to be inserted overwrite existing characters. It contains +`tt(localhistory)' if only local history commands will be visited or +`tt(globalhistory)' if imported history commands will also be visited. + +The substrings are sorted in alphabetical order so that if you want to +test for two specific substrings in a future-proof way, you can do match +by doing: + +example(if [[ $ZLE_STATE == *insert*globalhistory* ]]; then ...; fi) ) enditem() -- cgit 1.4.1