I removed the Inflector dependency in favor of heck for two reasons:
- to close#3674.
- heck seems simpler and actively maintained
We could probably alter the structure of the `str_` module to expose the
individual casing behaviors better.
I did not feel as confident on changing those signatures.
So I took a lazier approach of a macro in the `mod.rs` that creates the public
shimming function to heck's traits.
* Fix Configuration section in bug report template
Change the placeholder content to actually match the `to md` output, and add `--pretty`
* Don't omit data in placeholder configuration table
* Remove blank line in bug_report.yml
* fix#4140
We are passing commands into a shell underneath but we were not
escaping arguments correctly. This new version of the code also takes
into consideration the ";" and "&" characters, which have special
meaning in shells.
We would probably benefit from a more robust way to join arguments to
shell programs. Python's stdlib has shlex.join, and perhaps we can
take that implementation as a reference.
* clean up escaping of posix shell args
I believe the right place to do escaping of arguments was in the
spawn_sh_command function. Note that this change prevents things like:
^echo "$(ls)"
from executing the ls command. Instead, this will just print
$(ls)
The regex has been taken from the python stdlib implementation of shlex.quote
* fix non-literal parameters and single quotes
* address clippy's comments
* fixup! address clippy's comments
* test that subshell commands are sanitized properly
* have save --append create file if not exists
Currently, doing:
echo a | save --raw --append file.txt
will fail if file.txt does not exist. This PR changes that
* test that `save --append` will create new file
`winget install nu` fails because there's other options for "nu" now.
Using the full `nushell` word solved it for me.
[Imgur](https://imgur.com/aqz2qNp)
Typing `selector -qa` into nu would cause a `panic!`
This was the case because the inner loop incremented the `idx`
that was only checked in the outer loop and used it to index into
`lite_cmd.parts[idx]`
With the fix we now break loop.
Co-authored-by: ahkrr <alexhk@protonmail.com>