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

Convert control characters to bindkey/quoted-insert -style escape sequences



I know I can convert control characters to $'...' -style escape sequences using ${(qqqq)...} or ${(q+)...} expansion.

However, how can I convert control characters to bindkey/quoted-insert -style escape sequences?

For example, I want to convert a newline character to ^M and not $'\n'

Basically, I want the inverse of a ${(g:c:)...} expansion.



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