Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Rotate shell words widget



Hello,
I'm sharing my widget that rotates shell words. Thus:

$(( 1 )) $( 2 ) 3

becomes

3 $(( 1 )) $( 2 )

https://asciinema.org/a/7igqc3pmyhunbqcxf09lqs1ju

To use copy the two attached files to *functions directory and add to zshrc:

# Alt-r to rotate shell words right, Alt-R - left
autoload zew-rotate-shell-words
zle -N zew-rotate-shell-words
zle -N zew-rotate-shell-words-backwards zew-rotate-shell-words
bindkey '^[r' zew-rotate-shell-words
bindkey '^[R' zew-rotate-shell-words-backwards

The widget is part of Zsh Editing Workbench plugin:
https://github.com/psprint/zsh-editing-workbench

Best regards,
Sebastian Gniazdowski

Attachment: zew-rotate-shell-words
Description: Binary data

Attachment: zew-process-buffer
Description: Binary data



Messages sorted by: Reverse Date, Date, Thread, Author