Hacker News new | past | comments | ask | show | jobs | submit login

  cicada> echo -e '#!/bin/sh\necho works' > /bin/1
  cicada> chmod +x /bin/1
  cicada> 1
  1

  bash> 1
  works

  cicada> touch a b; echo "$(echo "$(echo "$(ls)")")"
  $(echo $(echo a
  b

  bash> echo "$(echo "$(echo "$(ls)")")"
  a
  b



For `touch a b; echo "$(echo "$(echo "$(ls)")")"`, I'll think about it.

It looks like a bad command to me (nested $ and nested `"` do not smell good). Probably I would mark this a wont-fix. But if I found I does make sense (useful in some meaningful places) - I'll consider to update cicada to align with Bash. Thanks for reporting.


Nested $() is fine, and not uncommon (though 3 levels like here is rarely used). All the nested "" present here are required, as removing any of them would cause a change in behavior (caused by word splitting).


# you have to use full path to make it work:

cicada> /bin/1

A bare `1` is a math arithmetic, as described in README, which with a higher precedence.


Perhaps you should consider removing the statement "Cicada will only be a "subset" of bash" from the project FAQ.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: