From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: Grant Taylor <gtaylor@tnetconsulting.net>
Cc: Zsh Users List <zsh-users@zsh.org>
Subject: Re: Looking for a pointer on what to search for to find information on command expansion / substitution.
Date: Sat, 25 Feb 2023 19:59:31 +0100 [thread overview]
Message-ID: <CAN=4vMraN4RoZiO-O+cKwh7wFVau6_A64tXGTAe7etDn1Tz12A@mail.gmail.com> (raw)
In-Reply-To: <0152877b-02dd-d30d-7141-96a772fe513e@spamtrap.tnetconsulting.net>
On Sat, Feb 25, 2023 at 7:51 PM Grant Taylor <gtaylor@tnetconsulting.net> wrote:
>
> I had a Zsh feature configured such that I could type "sclient<space>"
> and it ZLE (?) would replace that with "openssl s_client".
My best guess is that you had the following snippet in .zshrc that
you'd copied from zshwiki.org:
typeset -gA abbreviations=(
'sclient' 'openssl s_client'
)
magic-abbrev-expand() {
emulate -L zsh -o extended_glob
local MATCH
LBUFFER="${LBUFFER%%(#m)[_a-zA-Z0-9]#}"
LBUFFER+="${abbreviations[$MATCH]:-$MATCH}"
zle self-insert
}
no-magic-abbrev-expand() {
LBUFFER+=' '
}
zle -N magic-abbrev-expand
zle -N no-magic-abbrev-expand
bindkey ' ' magic-abbrev-expand
bindkey '^x ' no-magic-abbrev-expand
Roman.
next prev parent reply other threads:[~2023-02-25 19:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-25 18:50 Grant Taylor
2023-02-25 18:59 ` Roman Perepelitsa [this message]
2023-02-25 19:20 ` Grant Taylor
2023-03-01 21:23 ` Grant Taylor
2023-02-27 20:27 ` Lawrence Velázquez
2023-02-27 20:31 ` Roman Perepelitsa
2023-03-01 4:42 ` Grant Taylor
2023-03-01 4:51 ` Lawrence Velázquez
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='CAN=4vMraN4RoZiO-O+cKwh7wFVau6_A64tXGTAe7etDn1Tz12A@mail.gmail.com' \
--to=roman.perepelitsa@gmail.com \
--cc=gtaylor@tnetconsulting.net \
--cc=zsh-users@zsh.org \
/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).