sh
sh copied to clipboard
A shell parser, formatter, and interpreter with bash support; includes shfmt
Only similar issue I could find is #394, but that issue was closed a while back due to lack of OP reply. I believe a file of release binary SHA-256...
Simple script to recreate: ``` $ cat test.sh let a=5+4; echo $a # 9 let "a = 5 + 4"; echo $a # 9 let a++; echo $a # 10...
Error wrapping came with Go 1.13, so we're a bit late to adapt to it. At least, we should allow the user to unwrap internal errors from the errors returned...
- Add a CancelableReader type, and wrap stdin with it at the top of Runner.Run. - Also include CancelableReaderTTY which preserves stdin looking like a tty, i.e. [[ -t 0...
gosh is not meant to replace a full interactive shell, but it would still be nice to have the basics like being able to use the arrow keys to run...
Given the invalid command ``` let x/x ``` bash rightfully complains: ``` $ let x/x bash: let: x/x: division by 0 (error token is "x") ``` but gosh panics: ```...
The syntax `$((` and `((` are ambiguous and when printing, we space the opening parentheses as in: `( (`, as documented on the [Caveats](https://github.com/mvdan/sh#caveats) which is OK but we don't...
It seems that shfmt won't deal with a bash technique which is used in this code fragment: #!/bin/bash declare -a strings sdp=123 declare -a wordlists # list of wordlists declare...
I noticed that shfmt 3.5.1 (maybe also 3.5.0, I haven't tested yet) wants `${parameter-default}` which has different behavior from `${parameter:-default}` Ref: https://tldp.org/LDP/abs/html/parameter-substitution.html I believe this change should be reverted. Both...
This implements some of the commonly used options for the read builtin, with the notable exception of -t. Questions: 1. I don't love the duplication of some of the x/term...