Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quotes #15

Open
nloveladyallen opened this issue Jul 1, 2016 · 3 comments
Open

Quotes #15

nloveladyallen opened this issue Jul 1, 2016 · 3 comments

Comments

@nloveladyallen
Copy link

hacker@default ~ $echo "foo"
"foo"
@derekargueta
Copy link
Contributor

Implementing this seems to require building a more robust parser from scratch i.e. a character-by-character crawl. Might be my limited JavaScript knowledge, but I can't think of a nice way to parse with .split sequence. Even so, a hacky .split that includes splitting by " and looking for matching quotes etc. might be more complex/inefficient than just a O(n) walk of the input. Per the ECMA spec, each call to split will walk down the string left-to-right. Unless we come up with some uber-ninja regex that fits the bash grammar 😛

Thoughts @zackargyle?

@ErezSha
Copy link

ErezSha commented Feb 19, 2017

I've made a commit to remedy this.
echo $PATH "hello world"
will show
/ hello world

Is this the correct behavior?

@Sorgrum
Copy link

Sorgrum commented Jan 18, 2018

@ErezSha that looks correct, yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants