Skip to content

Conversation

@RikilG
Copy link
Contributor

@RikilG RikilG commented Oct 4, 2020

This PR can close #2 , #6 . I was able to come up with a simple fix for this. I just changed the Input Field Separator (IFS) variable to make bash break at new-line instead of the default space separator. I figured out this would be the easiest fix as the program (cdi.sh) is based on splitting at new-lines (w.r.t ls). In future, in case you need to revert back to default in some function, you can always use unset IFS to remove the modifications.

This is how it was before:
1

Here's how it looks now:
2

When you cd into folder with spaces, it looks like:
3

You can check the changes in code (it's just one line) in the files changed tab in the PR and let me know if I should make any more changes. Thank You!

@antonioolf
Copy link
Owner

Hello @RikilG , first sorry for the delay in responding. I was very busy with personal issues and was planning to take the time to analyze your contribution calmly. But I decided to answer now not to leave you so long without an answer.
I really liked it because you were able to solve a critical problem! :)
I will reserve some time soon to test and merge.

And if you have more ideas, feel free to continue contributing, let's make CDI a great tool :)

Thank you very much in advance.

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

Successfully merging this pull request may close these issues.

BUG - folders with space are breaking

2 participants