From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14806 invoked by alias); 20 Nov 2015 12:11:27 -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: 37170 Received: (qmail 164 invoked from network); 20 Nov 2015 12:11:26 -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 autolearn=ham autolearn_force=no version=3.4.0 X-AuditID: cbfec7f5-f79b16d000005389-0b-564f0b8fb8eb Date: Fri, 20 Nov 2015 12:01:17 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: WARN_CREATE_GLOBAL and parameters used by the shell Message-id: <20151120120117.28b4ee9d@pwslap01u.europe.root.pri> In-reply-to: <20151120115538.GB25070@cventin.lip.ens-lyon.fr> References: <20151120114456.GA24924@cventin.lip.ens-lyon.fr> <20151120115538.GB25070@cventin.lip.ens-lyon.fr> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrALMWRmVeSWpSXmKPExsVy+t/xy7r93P5hBl+fm1gcbH7I5MDoserg B6YAxigum5TUnMyy1CJ9uwSujKszz7EWfOOpWNj2mqWB8Q1XFyMnh4SAicS5HxPYIGwxiQv3 1gPZXBxCAksZJZbN3sUOkhASmMEk8XxHJkTiHKNE37RN7BDOWUaJ4ysusIJUsQioSvzqbmAE sdkEDCWmbpoNZosIiEucXXueBcQWFnCQ+L5oJtg6XgF7iT2LV4P1cgrYSjS19DFCbMuXuHh5 J1g9v4C+xNW/n5ggzrOXmHnlDCNEr6DEj8n3wGqYBbQkNm9rYoWw5SU2r3nLDDFHXeLG3d3s ExiFZyFpmYWkZRaSlgWMzKsYRVNLkwuKk9JzjfSKE3OLS/PS9ZLzczcxQsL56w7GpcesDjEK cDAq8fA2iPuFCbEmlhVX5h5ilOBgVhLhPfAOKMSbklhZlVqUH19UmpNafIhRmoNFSZx35q73 IUIC6YklqdmpqQWpRTBZJg5OqQZGt9MbVR7Pbt12IX82x1Zfr4w3zAXL8mcc3amWIp4yP/i9 tturFVPcXX7Hsj25vindZ3lWRXqIqNsZ9+sqjL13c/LzTSIUtghHcc3g3OVyoWBl++Rdh+/W PRd0Trq0wneZT++61Y8etv49eXFx9rVlp9Je2+7RDc1VWzWJlcFvXuSHfvP7M05tUWIpzkg0 1GIuKk4EAPQsds5jAgAA On Fri, 20 Nov 2015 12:55:38 +0100 Vincent Lefevre wrote: > There's a problem with smart-insert-last-word: > > smart-insert-last-word:63: scalar parameter _ilw_lcursor created globally in function > smart-insert-last-word:76: scalar parameter _ilw_hist created globally in function > smart-insert-last-word:77: scalar parameter _ilw_count created globally in function > smart-insert-last-word:122: scalar parameter _ilw_cursor created globally in function > smart-insert-last-word:125: scalar parameter _ilw_changeno created globally in function > Those are all intentional. pws diff --git a/Functions/Zle/smart-insert-last-word b/Functions/Zle/smart-insert-last-word index 67adea7..cf8715d 100644 --- a/Functions/Zle/smart-insert-last-word +++ b/Functions/Zle/smart-insert-last-word @@ -60,7 +60,7 @@ then lcursor=$_ilw_lcursor else NUMERIC=1 - _ilw_lcursor=$lcursor + typeset -g _ilw_lcursor=$lcursor fi # Handle the up to three arguments of .insert-last-word if (( $+1 )) @@ -73,8 +73,8 @@ then (( NUMERIC )) || LBUFFER[lcursor+1,cursor+1]='' numeric=$((-(${2:--numeric}))) fi -_ilw_hist=$HISTNO -_ilw_count=$NUMERIC +typeset -g _ilw_hist=$HISTNO +typeset -g _ilw_count=$NUMERIC if [[ -z "$numeric" ]] then @@ -119,7 +119,7 @@ fi (( NUMERIC > $#lastcmd )) && return 1 LBUFFER[lcursor+1,cursor+1]=$lastcmd[-NUMERIC] -_ilw_cursor=$CURSOR +typeset -g _ilw_cursor=$CURSOR # This is necessary to update UNDO_CHANGE_NO immediately -zle split-undo && _ilw_changeno=$UNDO_CHANGE_NO +zle split-undo && typeset -g _ilw_changeno=$UNDO_CHANGE_NO