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

Re: Something like noglob to inhibit brace expansion?



On Oct 4,  7:40pm, Lloyd Zusman wrote:
}
}   % pr {a,b,c,*}
}   a b c *
} 
} What I'd like to see is {a,b,c,*}
} 
} Does anyone know of any tricks to get this functionality within
} an alias?

It's a little ugly, but:

	alias pr='setopt noglob ignorebraces && _pr'
	_pr() { print $*; setopt glob braceexpand }

You can get a little fancier if you want to preserve the exit status of
'print', but you get the idea.



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