Comments (4)
I don't have a better idea, feel free to delete the branch. I'll close the issue once the docs has been updated.
from try.
The solution is to appropriately quote when we generate $script_to_execute
. A basic version of this would not be too hard, but subtleties of escaping abound.
Would be easily resolved in a rewrite not in the shell.
from try.
for arg in "$@"
do
case $arg in
(*[$(printf " \n\t()<>&;|\`?*\$\"'")\\]*)
quoted=$(echo "$arg" | sed -e "s/'/'\\\\''/")
printf "'%s' " "$quoted";;
(*) printf "%s " "$arg";;
esac
done
printf "\n"
is a workable first cut.
from try.
Our tests expect that try "echo hi>foo"
will preserve the redirect and that try "echo hi; echo bye"
will preserve the pair of commands.
I don't see how we can support both this existing behavior and appropriate quoting of things like bash -c
. An advantage of the current behavior is that you can run try "bash -c \"echo hi\""
and get the right behavior... whereas it's not clear how to preserve the shell syntax with this modified behavior.
Unless you have a better idea, I'll delete the branch and close the issue.
from try.
Related Issues (20)
- docker support HOT 2
- top level symlink handled incorrectly HOT 2
- future: sync HOT 2
- try release HOT 1
- apply changes properly when using multiple lowerdirs
- Understand gid mapping; build utility for it HOT 3
- try not preserving env vars HOT 2
- symbolic links do not migrate correctly
- sync root level changes
- proc mounted with wrong permission HOT 1
- try considering supporting macOS? HOT 1
- bug: environment differs inside try HOT 1
- Measuring and optimizing try's overhead HOT 3
- try broken on `rm -r` HOT 1
- `test/run_tests.sh` vanished HOT 1
- Creation of overlay directories can fail HOT 4
- Uncanny overlay behavior... bug in overlayfs? HOT 6
- run all vagrant tests at once HOT 1
- `try-summary` could generate commit shell script
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from try.