tcsh-org / tcsh

This is a read-only mirror of the tcsh code repository.
https://www.tcsh.org/
Other
232 stars 42 forks source link

Backticks can be nested; remove from BUGS #50

Closed Krush206 closed 9 months ago

Krush206 commented 2 years ago

This nesting style can lead to confusion, since it must be doubled (as in Bourne Shells). It'd be nice to have a $() wrapper for it.

Krush206 commented 2 years ago

Apparently, this nesting style is very different. I can't seem to find a way to nest three or more commands, but this works: echo "`echo "\`"pwd"\`"`"

Either there's no way to do so or I'm failing to understand.

Krush206 commented 1 year ago

echo "`{echo,"'`pwd`'"}`" This works too, but still no luck for multiple nesting.

Krush206 commented 1 year ago

echo "`echo "\"'`echo "\`"pwd"\`"`'\""`" For three nests, this works. This is very complicated.

I'm still investigating further.

Krush206 commented 1 year ago

echo "`echo "\"'`echo "\"'\''`echo "\`"pwd"\`"`'\''\""`'\""`" Finally made four nests. This nesting style is ridiculous, but does work.

Krush206 commented 1 year ago

https://bwass.org/bucket/IMG_20221127_093248.jpg echo "`echo "\"'`echo "\"'\''`echo "\"'\'\\\'\''`echo "\"'\'\\\'\\\\\\\'\\\'\''`echo "\`"pwd"\`"`'\'\\\'\\\\\\\'\\\'\''\""`'\'\\\'\''\""`'\''\""`'\""`"

Krush206 commented 1 year ago

echo "`echo "\"\`"echo "\"\\\"\\\`\""echo "\"\\\"\\\\\\\"\\\\\\\`\\\"\""echo "\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\`\\\\\\\"\\\"\""echo "\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\`\\\\\\\\\\\\\\\"\\\\\\\"\\\"\""pwd"\"\\\"\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\`\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\`\\\\\\\\\\\\\\\"\\\\\\\"\\\\\\\`\\\\\\\"\\\"\\\`\\\"\"\`\""`" This works too.

zoulasc commented 9 months ago

Updated.