Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: HISTNO zle parameter
- X-seq: zsh-workers 5926
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: PATCH: HISTNO zle parameter
- Date: Wed, 24 Mar 1999 13:41:36 +0100 (MET)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
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@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author