dundalek/closh

Redirection at the beginning of line does not work

Opened this issue · 0 comments

In bash one can specify redirection anywhere in the input, so these are all equivalent (in closh only the first one works):

  • ls -l > out.txt
  • ls > out.txt -l
  • > out.txt ls -l

I think it is more appropriate for input redirection. Lets say I want to work with a certain file.
Then < package.json grep cljs might be more natural than grep cljs < package.json.

Closh's grammar only supports redirects as the last thing. Question is whether it is worth supporting all positions or whether it would only complect things.