On Thu, Aug 28 2014, Kerin Millar wrote:

> On 28/08/2014 16:42, gottl...@nyu.edu wrote:
>> I know this is trivial and apologize in advance for what must be a simple
>> (non-gentoo) error on my part.
>>
>> In /home/gottlieb/bin/dia I have the following
>>      #!/bin/bash
>>      /usr/bin/dia --integrated
>>
>> ls -l /home/gottlieb/bin/dia gives
>>      -rwxr-xr-x 1 gottlieb gottlieb 38 Aug 28 11:28 /home/gottlieb/bin/dia
>>
>> echo $PATH gives
>>      
>> /home/gottlieb/bin/:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.8.2:/usr/games/bin
>>
>> which dia gives
>>      /home/gottlieb/bin/dia
>>
>> `which dia`
>>      correctly starts dia in "integrated" (one window) mode
>>
>> /home/gottlieb/bin/dia
>>      correctly starts in integrated mode
>>
>> /usr/bin/dia
>>      correctly starts dia in the default (two window) mode
>>
>> BUT plain
>> dia
>>      incorrectly starts dia in the default mode.
>>
>
> You might need to run hash -r in your current shell.

Bingo!  And it works fine in new shells.  Thank you.

> If that doesn't help then ensure that there is no alias.

There were no aliases.

> Incidentally, I would suggest that you write this in your script:
>
>   exec /usr/bin/dia --integrated

Done.  Thanks again.
allan

Reply via email to