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

fasd fails with comma decimal separator #154

Closed
nwinkler opened this issue Sep 13, 2012 · 2 comments
Closed

fasd fails with comma decimal separator #154

nwinkler opened this issue Sep 13, 2012 · 2 comments

Comments

@nwinkler
Copy link
Member

fasd (e.g. running z Documents) fails on my OS X machine with the following error:

-bash: cd: ,002    /Users/foo/Documents/Projects/FooBarDocuments: No such file or directory
1,16226    /Users/foo/Documents/Projects/Foo Dir
2,09207    /Users/foo/Documents/Projects/..
3,645      /Users/foo/Documents/Projects/foo_framework/02_Requirements
23,2452    /Users/foo/Documents/Projects/barDocuments/01_Documentation
28,9264    /Users/foo/Documents/Projects
42,8244    /Users/foo/Documents/Projects/foo_framework
368,002    /Users/foo/Documents/Projects/FooBarDocuments

I think this is due to my account using a German locale, where the comma is used as the decimal separator.

I've seen in the fasd.plugin.bash file that AWK is used for doing the calculations, and it looks like AWK is using the comma in this case. If I execute the following command, I end up with a result of 1,5:

awk "BEGIN{ print 3/2 }"

The code in fasd uses this to populate the "database", but while parsing, it looks for a point (.) as the decimal separator and thus fails.

@erichs Is that something you can look into?

Let me know if you need more info.

nwinkler added a commit to nwinkler2/dotbash that referenced this issue Sep 14, 2012
… locale that is using a comma as the decimal separator.
@nwinkler
Copy link
Member Author

Found the same issue here: https://github.com/clvv/fasd/issues/8

I've incorporated the fix from that ticket and I'm now going to submit a pull request on bash-it.

@nwinkler
Copy link
Member Author

Closing this, as I submitted a pull request in #156. Couldn't figure out how to convert this issue into a pull request :-(

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

1 participant