Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Now what | 29 comments | Create New Account
Click here to return to the 'Now what' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Now what
Authored by: babbage on Oct 17, '02 10:53:51PM

If the current working directory isn't in your path, then changing to /usr/local/bin wouldn't be enough either. The usual solutions are [a] add "." to your PATH environment variable (this is generally frowned on for security reasons, but is awfully convenient and I don't blame people for liking the setting), [b] prefix these commands with a dot-slash "./", which effectively fills in the full path for the shell (relatively simple, and not a security issue like the first option), or [c] run the command with the full path -- /usr/local/bin/nano.

Like others have said, you need to reload your command cache with "rehash", and make sure that /usr/local/bin is in your path with "printenv PATH". As a last ditch test you can try launching /usr/local/bin/nano directly, which should work regardless of your PATH or command cache, but really those need to be fixed. The alias will also work, but it's a "papering over the cracks" solution that treats the symptom, not the disease. In the long run it's better to just fix your PATH rather than add aliases for every single command...



[ Reply to This | # ]
Thank You very much!
Authored by: Glanz on Oct 20, '02 09:51:06AM

Well, after all my trouble, I switched to the zsh shell via the chsh command and corrected my paths there so that all worked well, then I did the same with bash. I came back to tcsh to do the same and all worked well, but in tcsh I had to use the "./", unlike the other shells. Thank you again! I really appreciated your little reminder! Zsh and Bash are the shells with which I am most comfortable, but tcsh has its advantages too, since it is the default shell for OS X.



[ Reply to This | # ]