2 ms·
Sweet! Similar to docopt. It's humbling to see how short this can be in Haskell, compared to my C++ code https://github.com/ridiculousfish/docopt_fish https://g
by ridiculous_fish 11y ago
Sweet! Similar to docopt. It's humbling to see how short this can be in Haskell, compared to my C++ code https://github.com/ridiculousfish/docopt_fish https://github.com/ridiculousfish/docopt_fish (though in my defense the C++ version is more featureful, with better error messages).
We're likely to build this sort of thing in directly to the fish shell: https://github.com/fish-shell/fish-shell/issues/478 https://github.com/fish-shell/fish-shell/issues/478 . From a usage spec, you get tab-completions, syntax highlighting, argument parsing and validation, and user help.
It's sort of silly that there is no machine-parseable usage spec for common Unix commands. Once the docopt support is integrated, I hope to create a repository of usage specs that anyone can contribute to, similar to explainshell.com
- maratc 11y ago> It's sort of silly that there is no machine-parseable usage spec for common Unix commands man pages can qualify for a usage spec. Projects like explainshell.com[1] parse these quite successfully. [1]http://explainshell.com http://explainshell.com