I have been attempting to implement the functionality described in the blog article "All of bash history revisited". Basically what the scripts enable you to do is keep all of your bash history forever and across multiple sessions.
Someone has kindly made all of the code easily accessible on Github.
However whenever I use a directory with spaces:
cd ~/Desktop/
mkdir "dir with spaces"
cd dir\ with\ spaces/
the next time I log in I get an errors like the following:
-bash: pushd: /Users/jack/Desktop/dir: No such file or directory
-bash: pushd: with: No such file or directory
-bash: pushd: spaces: No such file or directory
The only reference that I understood didn't seem to be causing the problem:
# Now change to the new dir and add to the top of the stack
pushd "${the_new_dir}" > /dev/null
I'm hoping some bash scripting expert can point out the error in the code so I can patch it.
This was the culprit:
for x in `hd 20` `pwd`; do cd_func $x ; done
Replace with:
( hd 20; pwd ) | while read x; do cd_func "$x"; done
Pull request issued at github repo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With