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

Escape dollar sign in completions inside double quotes #6060

Closed
wants to merge 2 commits into from

Conversation

krobelus
Copy link
Member

@krobelus krobelus commented Aug 24, 2019

Motivating example: Run touch 'foo$' and type ls "foo<TAB>

Current result: ls "foo$"
Result with this change: ls "foo\$"


TODOs:

  • Changes to fish usage are reflected in user documentation/manpages.
  • Tests have been added for regressions fixed
  • User-visible changes noted in CHANGELOG.md

@zanchey
Copy link
Member

zanchey commented Sep 2, 2019

I don't really understand your example - can you clarify? Is the echo supposed to be ls or some other command that accepts filenames?

@krobelus
Copy link
Member Author

krobelus commented Sep 2, 2019

Oh right, it doesn't work with echo, I corrected the example now

Motivating example: `touch 'foo$'; ls "foo<TAB>`
@mqudsi
Copy link
Contributor

mqudsi commented Sep 6, 2019

Can you please add it the same way the \ is currently escaped? It's a switch statement, we should strive to use it.

case L'\\':
result.append({L'\\', L'\\'});
break;

@mqudsi mqudsi closed this in 962bfa9 Sep 7, 2019
@mqudsi
Copy link
Contributor

mqudsi commented Sep 7, 2019

Merged. Thanks.

@zanchey zanchey added this to the fish 3.1.0 milestone Sep 8, 2019
@krobelus krobelus deleted the escape-dollar branch September 10, 2019 06:54
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants