Re: difficult alias

Ray Andrews <[email protected]>
Newsgroups gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user
Message-ID <[email protected]>

On 2026-05-03 13:50, Mark J. Reed wrote:
> Also as a function you can just supply the value as a parameter 
> instead of hard coding the use of $var. you could even default to a 
> predefined named variable if no parameter is specified, e.g.
>
> tst() {
>     fold -sw 80 <<<"${1:-$var}" | sed '...'
> }
>
> Which will operate on whatever you pass to it but if you don't pass 
> anything will use the value of $var.
That is really clever.  Come to think of it, there could be cases where 
it could have that sort of utility.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.