zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: PATCH: always last prompt
Date: Mon, 12 Jul 1999 10:14:50 +0200 (MET DST)	[thread overview]
Message-ID: <199907120814.KAA17797@beta.informatik.hu-berlin.de> (raw)


If you have alwayslastprompt set and use e.g. the _expand completer
with a numeric argument, the cursor will not be moved up because
alwastlastprompt just toggles between moving up with or without a
numeric argument. So I've just added another configuration key for
_main_complete that allows one to say that it should move up
unconditionally.


Bye
 Sven

diff -u oc/Core/_main_complete Completion/Core/_main_complete
--- oc/Core/_main_complete	Thu Jul  8 11:11:49 1999
+++ Completion/Core/_main_complete	Mon Jul 12 10:07:12 1999
@@ -15,9 +15,13 @@
 #    any matches, correction is tried and if that doesn't yield
 #    anything either, correcting completion is attempted.
 #
-# These completer functions are only used when this function is called
-# without arguments. If arguments are given, they should be names of
-# completer functions which will then be called.
+#    These completer functions are only used when this function is called
+#    without arguments. If arguments are given, they should be names of
+#    completer functions which will then be called.
+#
+#  last_prompt
+#    If this is set to `always' the cursor is moved up to the last prompt
+#    after printing a list even if a numeric argument was given.
 
 
 # If you want to complete only set or unset options for the unsetopt
@@ -59,6 +63,8 @@
     break;
   fi
 done
+
+[[ "$compconfig[last_prompt]" = always ]] && compstate[last_prompt]=yes
 
 _lastcomp=( "${(@kv)compstate}" )
 _lastcomp[completer]="$comp"
diff -u od/Zsh/compsys.yo Doc/Zsh/compsys.yo
--- od/Zsh/compsys.yo	Fri Jul  9 15:48:10 1999
+++ Doc/Zsh/compsys.yo	Mon Jul 12 10:10:24 1999
@@ -249,6 +249,11 @@
 called. If the return value is zero, no other completers are tried and the
 tt(_main_complete) function returns.
 
+The widget function tt(_main_complete) also uses the configuration key 
+tt(last_prompt). If this is set to tt(always), the cursor is moved up
+to the last prompt after printing a list of matches even if a numeric
+argument was given.
+
 The following completer functions are contained in the distribution (users
 may write their own):
 

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


                 reply	other threads:[~1999-07-12  8:14 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=199907120814.KAA17797@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).