ControlxFreak / go2

Quickly navigate directories using a nickname configuration file!
MIT License
2 stars 2 forks source link

`#!/bin/bash` should be first line #8

Closed Hades0299 closed 6 years ago

Hades0299 commented 6 years ago

Hi, AFAIK the linw with #!/bin/bash should be in the firtst line of the scripts.

This might also fix #5.

Regards Hades

ControlxFreak commented 6 years ago

Ahhhh good catch. Thanks! I'll make that change.

ControlxFreak commented 6 years ago

Fixed this in commit a45fec9. I did not see it fix issue #5 but I'm going to keep testing it and poking around to see whats up.

Out of curriousity, why do you think this would fix #5?

Hades0299 commented 6 years ago

The line #!/bin/bash tells the shell, to run this programm as /bin/bash go2 (as an example), or in other words in a new Process. So there should be no variables left in the current shell, as they are created in another bash in another Process.

ControlxFreak commented 6 years ago

Yeah but unfortunately the intention of the 'alias go2=. go2' is so go2 does execute in the current shell (otherwise cd would be pointless - it would cd a bash shell in another process and then terminate).

Hades0299 commented 6 years ago

Looks like I didn't think before writing ;)