zsh-users
 help / color / mirror / code / Atom feed
* Example Zle -T transformation function?
@ 2023-09-09 15:41 Sebastian Gniazdowski
  2023-09-09 16:46 ` Mikael Magnusson
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Gniazdowski @ 2023-09-09 15:41 UTC (permalink / raw)
  To: Zsh Users

[-- Attachment #1: Type: text/plain, Size: 486 bytes --]

In the manual, there are zle -T functions mentioned:

              -T     This is used to add, list or remove internal
 transforma‐
                     tions on the processing performed by the line editor.
It
                     is typically used only for debugging or  testing  and
 is
                     therefore of little interest to the general user.

Could someone provide an example of such transformation function?

-- 
Best regards,
Sebastian Gniazdowski

[-- Attachment #2: Type: text/html, Size: 1081 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Example Zle -T transformation function?
  2023-09-09 15:41 Example Zle -T transformation function? Sebastian Gniazdowski
@ 2023-09-09 16:46 ` Mikael Magnusson
  2023-09-10  7:16   ` Sebastian Gniazdowski
  0 siblings, 1 reply; 5+ messages in thread
From: Mikael Magnusson @ 2023-09-09 16:46 UTC (permalink / raw)
  To: Sebastian Gniazdowski; +Cc: Zsh Users

On 9/9/23, Sebastian Gniazdowski <sgniazdowski@gmail.com> wrote:
> In the manual, there are zle -T functions mentioned:
>
>               -T     This is used to add, list or remove internal
>  transforma‐
>                      tions on the processing performed by the line editor.
> It
>                      is typically used only for debugging or  testing  and
>  is
>                      therefore of little interest to the general user.
>
> Could someone provide an example of such transformation function?

https://www.zsh.org/mla/workers/2012/msg00013.html

-- 
Mikael Magnusson


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Example Zle -T transformation function?
  2023-09-09 16:46 ` Mikael Magnusson
@ 2023-09-10  7:16   ` Sebastian Gniazdowski
  2023-09-10  7:26     ` Sebastian Gniazdowski
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Gniazdowski @ 2023-09-10  7:16 UTC (permalink / raw)
  To: Mikael Magnusson; +Cc: Zsh Users

[-- Attachment #1: Type: text/plain, Size: 891 bytes --]

Thanks. It seems that a transformation function takes per char data and is
allowed to return multiple char strings.


On Sat, 9 Sept 2023 at 18:46, Mikael Magnusson <mikachu@gmail.com> wrote:

> On 9/9/23, Sebastian Gniazdowski <sgniazdowski@gmail.com> wrote:
> > In the manual, there are zle -T functions mentioned:
> >
> >               -T     This is used to add, list or remove internal
> >  transforma‐
> >                      tions on the processing performed by the line
> editor.
> > It
> >                      is typically used only for debugging or  testing
> and
> >  is
> >                      therefore of little interest to the general user.
> >
> > Could someone provide an example of such transformation function?
>
> https://www.zsh.org/mla/workers/2012/msg00013.html
>
> --
> Mikael Magnusson
>


-- 
Best regards,
Sebastian Gniazdowski

[-- Attachment #2: Type: text/html, Size: 1754 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Example Zle -T transformation function?
  2023-09-10  7:16   ` Sebastian Gniazdowski
@ 2023-09-10  7:26     ` Sebastian Gniazdowski
  2023-09-10 12:20       ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastian Gniazdowski @ 2023-09-10  7:26 UTC (permalink / raw)
  To: Mikael Magnusson; +Cc: Zsh Users

[-- Attachment #1: Type: text/plain, Size: 1252 bytes --]

I wonder why on clean shell (-f) only one invocation occurs, for the second
entered char?
    https://asciinema.org/a/1nq0mvGGlu62f1BxLWT2FeT2R

What use case can T-func have?


On Sun, 10 Sept 2023 at 09:16, Sebastian Gniazdowski <sgniazdowski@gmail.com>
wrote:

> Thanks. It seems that a transformation function takes per char data and is
> allowed to return multiple char strings.
>
>
> On Sat, 9 Sept 2023 at 18:46, Mikael Magnusson <mikachu@gmail.com> wrote:
>
>> On 9/9/23, Sebastian Gniazdowski <sgniazdowski@gmail.com> wrote:
>> > In the manual, there are zle -T functions mentioned:
>> >
>> >               -T     This is used to add, list or remove internal
>> >  transforma‐
>> >                      tions on the processing performed by the line
>> editor.
>> > It
>> >                      is typically used only for debugging or  testing
>> and
>> >  is
>> >                      therefore of little interest to the general user.
>> >
>> > Could someone provide an example of such transformation function?
>>
>> https://www.zsh.org/mla/workers/2012/msg00013.html
>>
>> --
>> Mikael Magnusson
>>
>
>
> --
> Best regards,
> Sebastian Gniazdowski
>
>

-- 
Best regards,
Sebastian Gniazdowski

[-- Attachment #2: Type: text/html, Size: 3001 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Example Zle -T transformation function?
  2023-09-10  7:26     ` Sebastian Gniazdowski
@ 2023-09-10 12:20       ` Bart Schaefer
  0 siblings, 0 replies; 5+ messages in thread
From: Bart Schaefer @ 2023-09-10 12:20 UTC (permalink / raw)
  To: Sebastian Gniazdowski; +Cc: Mikael Magnusson, Zsh Users

On Sun, Sep 10, 2023 at 12:25 AM Sebastian Gniazdowski
<sgniazdowski@gmail.com> wrote:
>
> I wonder why on clean shell (-f) only one invocation occurs, for the second entered char?

For some reason ZLE thinks it needs to back up and reprint the first
character before printing the second.

> What use case can T-func have?

users/29224 https://www.zsh.org/mla/users/2023/msg00606.html


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-09-10 12:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-09 15:41 Example Zle -T transformation function? Sebastian Gniazdowski
2023-09-09 16:46 ` Mikael Magnusson
2023-09-10  7:16   ` Sebastian Gniazdowski
2023-09-10  7:26     ` Sebastian Gniazdowski
2023-09-10 12:20       ` Bart Schaefer

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).