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

z does not work on folder names with parantheses #53

Closed
donjar opened this issue Feb 8, 2018 · 7 comments
Closed

z does not work on folder names with parantheses #53

donjar opened this issue Feb 8, 2018 · 7 comments

Comments

@donjar
Copy link

donjar commented Feb 8, 2018

Steps to reproduce

  1. mkdir ~/\(whatever\)
  2. z ~/\(whatever\)

Expected result

It changes directory to ~/(whatever)

Actual result

'/home/donjar/(whatever)' did not match any results⏎

Versions

$ fish -v
fish, version 2.7.1
$ fisher -v
fisherman version 2.13.2
@jethrokuan
Copy link
Owner

jethrokuan commented Feb 8, 2018

Looks like awk prints out the result in single quotes if the string has brackets in it:

after tweaking z to print $target:

❯ z what                                                                                         12:36:58 PM 
'/home/jethro/(whatever)'
❯ z code                                                                                         12:37:27 PM 
/home/jethro/Documents/Code

not sure how to fix this properly.

@externl
Copy link
Contributor

externl commented Feb 9, 2018

What about running it though string escape?

❯ string escape -n '/home/jethro/(whatever)'
/home/jethro/\(whatever\)

@jethrokuan
Copy link
Owner

how would you pass the quoted string to string escape? i.e.

set -l test "'test'"

how to transform $test into a string without quotes?

@externl
Copy link
Contributor

externl commented Feb 10, 2018

There's also:

❯ z ~\(
awk: illegal primary in regular expression ~( at
 input record number 1, file /Users/joe/.local/share/z/data
 source line number 51
``

@externl
Copy link
Contributor

externl commented Feb 10, 2018

Maybe the arg should be escaped before being passing into awk (I haven't looked the impl)?

@jethrokuan
Copy link
Owner

@donjar should be fixed by #72 , you can try it now!

@jethrokuan
Copy link
Owner

Should be fixed now, closing.

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

3 participants