From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19772 invoked by alias); 13 Jan 2013 14:25:51 -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: 17555 Received: (qmail 22865 invoked from network); 13 Jan 2013 14:25:50 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,HTML_MESSAGE,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.223.173 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=6e+w8QRI/4EDKwBbANiIR0LRNlPT/61sSQO4tkeorb4=; b=qZpHYXVsWfpSW69zAgGoxTxbdGBC9dVep6+52wrwJ+UuTfPobrehZHmjld9KzUBpZ2 XaqjrbmLVclLidUu9AMYAOZ8E5BNIr98VFlijIHSTtW1ZE0sKuapWtrMsuROCuOwC6ye gaS+ekqAqIVX5znRZ/uNTOjdpi07orAGm7ztv5Y7I2b/x8DIKb3iE6W0rL9lBHhP2EJ0 h7yHDfn0/GbFnOFZ++09vvC2BSUYBCsDe2GNg6NVhCPPuV97s+LtngRuSOoHBTFzxFER VY+jlw/F1lSQ6aoR+uZdu5VujnGnSLQyZfYqDU6Cwlp4/j+vYBXqONUQXC6WEd5QT/Yx KeKA== MIME-Version: 1.0 Date: Sun, 13 Jan 2013 19:55:43 +0530 Message-ID: Subject: vared history not working inside scripts From: rahul To: zsh-users@zsh.org Content-Type: multipart/alternative; boundary=20cf301d4414c29c5404d32c4db1 --20cf301d4414c29c5404d32c4db1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On the command line, "vared -h" allows me to access history using arrow keys or Control-R. Inside a script, nothing happens. Is there some setting I have to make in scripts. Here is an example: #!/usr/bin/env zsh export HISTFILE=3D~/.zhistory print "HIST: " $HISTFILE bindkey "^R" history-incremental-search-backward bindkey "^[[5~" up-line-or-history bindkey "^[[6~" down-line-or-history bindkey "^[[A" up-line-or-history bindkey "^[[B" down-line-or-history bindkey "=1BOA" up-line-or-history foo=3D"default text" vared -h -p "Enter :" foo (I have tried putting commands prior to the vared so some history is built up in the program, or putting two vared calls, but in no case is history called or available. ) After putting the key bindings into the script, control-R prompts for backward search but there's only one item in history which is the value of foo. That is perhaps why the up arrow does nothing. How can i get some history for the user to choose from ? I'd of course prefer that if the user selected this option several times during the running of the program, that i could build up the history for this variable -- but most importantly I'd like to know what I am missing here due to which I get no history. (I use OSX ML, latest zsh from homebrew 5.0.2 and zprezto). --20cf301d4414c29c5404d32c4db1--