4 ms·
A first impression reading the "Getting started": https://tokay.dev/getting-started/ https://tokay.dev/getting-started/ How does the Tokay executable know tha
by sshine 4y ago
A first impression reading the "Getting started":
https://tokay.dev/getting-started/ https://tokay.dev/getting-started/
How does the Tokay executable know that some argument is a string vs. a file?
# What if I have a file named "save the wales"?
tokay program.tok -- file.txt
tokay program.tok -- "save the wales"
# What if I have a file named '.+'?
tokay program.tok
tokay '.+'
This feels like someone thought this was neat because you don't need to specify `-e`, but it comes at the cost of ambiguity where your program does something different depending on the filesystem. This has a cost in environments where you're not in full control (e.g. when you distribute your executable for others to use).