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

Possible :q quoting bug



Hi,
I expect this function to be idempotent on the command line:
```
Function reveal() {
eval “${@:q}”
}
```
But it’s not. It loses empty args.
I have written the following function to fix this ‘bug’:
```
gquote () {
	local i
	for i in "$@"
	do
		test -z "$i" && print -rn "''" " " || print -rn -- "${i:q}" " "
	done
}
```


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