[-- Attachment #1: Type: text/plain, Size: 719 bytes --] Hi, I need some help knowing what to search for / where to look to find information on something I want to rebuild after recently loosing access to a system with a working config. (Please don't ask, I can't tell.) I had a Zsh feature configured such that I could type "sclient<space>" and it ZLE (?) would replace that with "openssl s_client". I'd like to rebuild this functionality on my current system, but I'm not sure what Zsh feature this was. I do know that it wasn't aliase. I also think that it wasn't a function. I /think/ it was a ZLE tweak. Will someone point me at what I need to search for in the man page to rebuild this functionality? -- Grant. . . . unix || die [-- Attachment #2: S/MIME Cryptographic Signature --] [-- Type: application/pkcs7-signature, Size: 4017 bytes --]
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.
[-- Attachment #1: Type: text/plain, Size: 644 bytes --] On 2/25/23 11:59 AM, Roman Perepelitsa wrote: > My best guess is that you had the following snippet in .zshrc that > you'd copied from zshwiki.org: Thank you Roman. That does seem to function the way that -- I think -- I want. The magic-abbrev-expand() function seems to be more complex than I remember. But perhaps I'm mis-remembering and / or this version is more robust than what I was using. Either way, this does provide the desired functionality. I will use this as is for now and spend more time learning about the components in the coming days. Thank you again. :-) -- Grant. . . . unix || die [-- Attachment #2: S/MIME Cryptographic Signature --] [-- Type: application/pkcs7-signature, Size: 4017 bytes --]
On Sat, Feb 25, 2023, at 1:50 PM, Grant Taylor wrote: > Hi, > > I need some help knowing what to search for / where to look to find > information on something I want to rebuild after recently loosing access > to a system with a working config. (Please don't ask, I can't tell.) > > I had a Zsh feature configured such that I could type "sclient<space>" > and it ZLE (?) would replace that with "openssl s_client". > > I'd like to rebuild this functionality on my current system, but I'm not > sure what Zsh feature this was. I do know that it wasn't aliase. I > also think that it wasn't a function. I /think/ it was a ZLE tweak. > > Will someone point me at what I need to search for in the man page to > rebuild this functionality? This is exactly the same message you posted two days ago. Did you resend it erroneously? Did you see Roman's reply to the original? https://www.zsh.org/mla/users/2023/msg00349.html -- vq
On Mon, Feb 27, 2023 at 9:28 PM Lawrence Velázquez <larryv@zsh.org> wrote: > > On Sat, Feb 25, 2023, at 1:50 PM, Grant Taylor wrote: > > > > I need some help [...] > > This is exactly the same message you posted two days ago. Did you > resend it erroneously? Did you see Roman's reply to the original? Looks like some kind of email delivery mishap. See below: On Mon, Feb 27, 2023 at 1:41 AM Grant Taylor <gtaylor@tnetconsulting.net> wrote: > > Hi Roman, > > I wanted to send you a quick note directly because I realized that my > message to the Zsh Users List thanking you seems to be stuck somewhere. > > Thank you, you quickly got me on the proper path. > > Sorry for the delay in responding / acknowledging / thanking you. Roman.
[-- Attachment #1: Type: text/plain, Size: 846 bytes --] On 2/27/23 1:27 PM, Lawrence Velázquez wrote: > This is exactly the same message you posted two days ago. Did you > resend it erroneously? I didn't /personally/ re-send it. But -- as Roman indicated -- it seems as if there was some sort of yet unexplained email communications error that caused the message to be duplicated - now triplicated. I've never seen this type of failure before. There seems to have been a transient routing problem that was causing havoc. My mail server doesn't think that the message was successfully delivered until just a little bit ago. It's been trying to communicate with mail.zsh.org for days but couldn't because of routing problems. > Did you see Roman's reply to the original? Yes I did. As evident by my reply to Roman thanking him. -- Grant. . . . unix || die [-- Attachment #2: S/MIME Cryptographic Signature --] [-- Type: application/pkcs7-signature, Size: 4017 bytes --]
On Tue, Feb 28, 2023, at 11:42 PM, Grant Taylor wrote:
> On 2/27/23 1:27 PM, Lawrence Velázquez wrote:
>> Did you see Roman's reply to the original?
>
> Yes I did.
>
> As evident by my reply to Roman thanking him.
Which wasn't delivered to the list until two hours ago.
--
vq
[-- Attachment #1: Type: text/plain, Size: 873 bytes --] On 2/25/23 12:20 PM, Grant Taylor wrote: > The magic-abbrev-expand() function seems to be more complex than I > remember. But perhaps I'm mis-remembering and / or this version is more > robust than what I was using. I wanted to provide some follow up on some minor tweaks that I've made to be compatible with an older version of Zsh; 4.3.10. I have changed the following: typeset -gA abbreviations=( 'sclient' 'openssl s_client' ) To be: typeset -gA abbreviations typeset abbreviations=( 'sclient' 'openssl s_client' ) I have also remarked the following: emulate -L zsh -o extended_glob I am indeed getting the desired functionality, even on older versions of Zsh. Thank you again Roman for pointing to the documentation and for the solution. -- Grant. . . . unix || die [-- Attachment #2: S/MIME Cryptographic Signature --] [-- Type: application/pkcs7-signature, Size: 4017 bytes --]