From: Peter Stephenson <pws@cambridgesiliconradio.com>
To: zsh-workers@sunsite.auc.dk (Zsh hackers list)
Subject: Re: Odd autoremoveslash behaviour
Date: Tue, 16 May 2000 11:59:24 +0100 [thread overview]
Message-ID: <0FUN003JZFV0BO@la-la.cambridgesiliconradio.com> (raw)
In-Reply-To: "Your message of Tue, 16 May 2000 10:03:06 +0200." <200005160803.KAA23295@beta.informatik.hu-berlin.de>
Sven wrote:
> > % echo /
> > ^gorn.
>
> (Hey, super woody word...)
It's quite olde englishe. There's a song by Flanders and Swann to the tune
of the rondo to Mozart's fourth horn concerto with the words (to the slow,
minor key episode in the middle) `Lost that horn... Found that
horn... Gorn'.
The removeslash behaviour now works. I had a play round with menu
selection and found if you try and turn it off by setting the menu style,
it doesn't work because _main_complete doesn't unset MENUSELECT unless
explicitly told to. Is there any reason not to make that local in
_main_complete?
Further, setting the style to select=long does set MENUSELECT correctly,
but unless I've misunderstood doesn't seem to have the effect that menu
selection is only started for lists longer than a page.
The following simple function, zse (Z style edit) makes it easy to edit
styles on the fly; it's sort of zed-like. Any interest in including it?
Having argued for vared to behave as if you were editing the parameter
value, I now find I need to make it behave as if you had a full command
line, since you do. How do I do that with compcontext?
# Edit shell styles as `zstyle' command lines. Lines are evaluated as
# ordinary shell code. The altered styles are not saved.
#
# With arguments, edit the existing styles for any style names matching
# the patterns given (quote to protect from filename generation).
# With no arguments, edit all styles.
#
# Example:
# zse menu list-prompt
# allows you to edit any existing zstyle lines for the menu and list-prompt
# styles. Hit return to accept, ^G to abort.
#
# To do:
# persuade completion to do ordinary command-line completion inside vared;
# make zse arguments complete style names.
emulate -L zsh
unsetopt ksharrays
local styles line pat
if (( $# )); then
zstyle -L | while read -A line; do
for pat in $*; do
if [[ $line[3] = ${~pat} ]]; then
styles="${styles:+$styles
}$line"
break
fi
done
done
else
styles="$(zstyle -L)"
fi
vared styles && eval $styles
--
Peter Stephenson <pws@cambridgesiliconradio.com>
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070
next prev parent reply other threads:[~2000-05-16 11:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-16 8:03 Sven Wischnowsky
2000-05-16 10:59 ` Peter Stephenson [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-05-15 15:06 Peter Stephenson
2000-05-15 15:11 ` Peter Stephenson
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=0FUN003JZFV0BO@la-la.cambridgesiliconradio.com \
--to=pws@cambridgesiliconradio.com \
--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).