ngs-lang / ngs

Next Generation Shell (NGS)
https://ngs-lang.org/
GNU General Public License v3.0
1.4k stars 43 forks source link

jc integration - suggest to install #530

Open ilyash-b opened 2 years ago

ilyash-b commented 2 years ago

NGS should recommend to install jc when NGS is unable parse the output of a command or a contents of a file.

Parsing a command

data = ``some_command``

If the above fails, the recommendation should say something like "please install jc and run as following:"

data = ``jc some_command``

Parsing a file

Example:

data = fetch('/etc/fstab')

Same for the above except no code modification is required, just re-run when jc is installed.

Useful information

Baking the list of supported commands into NGS

ilyash-b commented 2 years ago

Have second thoughts regarding the exact behavior of fetch(). It is asymmetrical with the run-and-parse syntax. The issue here is if at any point in time, NGS will consider a particular file or two so important as to have built-in parser in NGS, there would be a conflict.

ilyash-b commented 2 years ago

TODO: also handle the situation with run-and-parse when jc is installed but was not used