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

Function 'nicedirname' doesn't work as expected #38

Closed
atueting opened this issue Aug 15, 2019 · 3 comments
Closed

Function 'nicedirname' doesn't work as expected #38

atueting opened this issue Aug 15, 2019 · 3 comments

Comments

@atueting
Copy link

*) printf '\-%s' "$dirname" ;;
With this code the archive always entails a backslash.

@assistcontrol
Copy link
Collaborator

Which OS are you using?

@assistcontrol
Copy link
Collaborator

printf is a finicky beast. And so is echo. Different OSes treat leading dashes differently, and I had to guess at a mechanism that would work everywhere.

It's true that nicedirname always includes a backslash, but it should have always interpolated away when included in strings. In retrospect, that simply wasn't a good approach.

I'm going to commit a different approach. Please, give it a try and let me know how it works for you.

@atueting
Copy link
Author

Indeed, your patch fixed the issue! Thanks for your quick turnaround!

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

2 participants