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

Re: difficult alias





On 2026-05-03 07:36, Eric Cook wrote:
On 5/3/26 10:23 AM, Ray Andrews wrote:
... can that alias be repaired?
It could, but why not just make it a function?

tst() { echo -E $var | fold -sw 80 | sed ':a;N;$!ba;s/\n/\n /g' }

It looks just like how you would type it interactively and allows you to copy and paste code from the definition without needed to undo
the escaping needed for it to be an alias.
Good idea!  I know there's a sort of very general distrust of aliases anyway.  Function is transparent.  KISS.

Tx.







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