zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: HISTNO zle parameter
Date: Wed, 24 Mar 1999 13:41:36 +0100 (MET)	[thread overview]
Message-ID: <199903241241.NAA21179@beta.informatik.hu-berlin.de> (raw)


This adds the `HISTNO' zle parameter giving the current history
number. It is readonly.

This also makes `NUMERIC' settable, which was already there, but
disabled due to the `PM_READONLY' in the table. Ahem.

It also make `_list' use `HISTNO'.

Bye
 Sven

diff -u os/Zle/zle_params.c Src/Zle/zle_params.c
--- os/Zle/zle_params.c	Wed Mar 24 09:08:33 1999
+++ Src/Zle/zle_params.c	Wed Mar 24 13:33:47 1999
@@ -67,7 +67,9 @@
         zleunsetfn, NULL },
     { "keys", PM_ARRAY | PM_READONLY, NULL, FN(get_keys),
         zleunsetfn, NULL },
-    { "NUMERIC", PM_INTEGER | PM_READONLY, FN(set_numeric), FN(get_numeric),
+    { "NUMERIC", PM_INTEGER, FN(set_numeric), FN(get_numeric),
+        zleunsetfn, NULL },
+    { "HISTNO", PM_INTEGER | PM_READONLY, NULL, FN(get_histno),
         zleunsetfn, NULL },
     { NULL, 0, NULL, NULL, NULL, NULL }
 };
@@ -260,4 +262,11 @@
 get_numeric(Param pm)
 {
     return zmult;
+}
+
+/**/
+static long
+get_histno(Param pm)
+{
+    return histline;
 }
diff -u oc/Core/_list Completion/Core/_list
--- oc/Core/_list	Wed Mar 24 13:29:58 1999
+++ Completion/Core/_list	Wed Mar 24 13:38:20 1999
@@ -33,7 +33,7 @@
 # Get the strings to compare.
 
 if [[ -z "$compconfig[list_word]" ]]; then
-  pre="$LBUFFER"
+  pre="$HISTNO$LBUFFER"
   suf="$RBUFFER"
 else
   pre="$PREFIX"
diff -u od/Zsh/options.yo Doc/Zsh/options.yo
--- od/Zsh/options.yo	Mon Mar 22 13:45:07 1999
+++ Doc/Zsh/options.yo	Mon Mar 22 15:51:09 1999
@@ -343,11 +343,11 @@
 item(tt(GLOB_COMPLETE))(
 When the current word has a glob pattern, do not insert all the words
 resulting from the expansion but generate matches as for completion and
-cycle through them like tt(MENU_COMPLETE). If no matches are found, a
-`tt(*)' is added to the end of the word or inserted at the cursor if
-tt(COMPLETE_IN_WORD) is set, and completion is attempted again using
-pattern matching.  Since this doesn't use globbing, it works not only for
-files but for all completions, such as options, user names, etc.
+cycle through them like tt(MENU_COMPLETE). The matches are generated
+as if a `tt(*)' is added to the end of the word or inserted at the cursor if
+tt(COMPLETE_IN_WORD) is set.  Since this doesn't use globbing, it
+works not only for files but for all completions, such as options,
+user names, etc.
 )
 pindex(GLOB_DOTS)
 cindex(globbing, of . files)
diff -u od/Zsh/zle.yo Doc/Zsh/zle.yo
--- od/Zsh/zle.yo	Mon Mar 22 13:45:07 1999
+++ Doc/Zsh/zle.yo	Wed Mar 24 13:39:50 1999
@@ -158,6 +158,10 @@
 item(tt(NUMERIC) (integer))(
 The numeric argument.
 )
+vindex(HISTNO)
+item(tt(HISTNO) (integer))(
+The current history number.
+)
 enditem()
 sect(Standard Widgets)
 cindex(widgets, standard)

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


                 reply	other threads:[~1999-03-24 12:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199903241241.NAA21179@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).