Background: One of my colleagues who doesn't come from a Linux background asked me about using ./
before some commands and not others, so I explained to him how PATH
works and how binaries are chosen to be run. His response was that it was dumb and he just wanted to not need to type ./
before commands.
Question: Is there a way to easily modify the behavior of the shell such that $PWD
is always the first item on PATH
?
~/bin
and make it part ofPATH
? This keeps things organized ,too.PATH
(which is the usual source of such considerations).