* PATCH: HISTNO zle parameter
@ 1999-03-24 12:41 Sven Wischnowsky
0 siblings, 0 replies; only message in thread
From: Sven Wischnowsky @ 1999-03-24 12:41 UTC (permalink / raw)
To: zsh-workers
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1999-03-24 12:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-24 12:41 PATCH: HISTNO zle parameter Sven Wischnowsky
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).