Gentoo Archives: gentoo-user

From: gottlieb@×××.edu
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] trouble overriding a command name
Date: Thu, 28 Aug 2014 16:51:11
Message-Id: 87d2bk36dl.fsf@nyu.edu
In Reply to: Re: [gentoo-user] trouble overriding a command name by "Canek Peláez Valdés"
1 On Thu, Aug 28 2014, Canek Peláez Valdés wrote:
2
3 > On Thu, Aug 28, 2014 at 10:42 AM, <gottlieb@×××.edu> wrote:
4 >> I know this is trivial and apologize in advance for what must be a simple
5 >> (non-gentoo) error on my part.
6 >>
7 >> In /home/gottlieb/bin/dia I have the following
8 >> #!/bin/bash
9 >> /usr/bin/dia --integrated
10 >>
11 >> ls -l /home/gottlieb/bin/dia gives
12 >> -rwxr-xr-x 1 gottlieb gottlieb 38 Aug 28 11:28 /home/gottlieb/bin/dia
13 >>
14 >> echo $PATH gives
15 >> /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
16 >>
17 >> which dia gives
18 >> /home/gottlieb/bin/dia
19 >>
20 >> `which dia`
21 >> correctly starts dia in "integrated" (one window) mode
22 >>
23 >> /home/gottlieb/bin/dia
24 >> correctly starts in integrated mode
25 >>
26 >> /usr/bin/dia
27 >> correctly starts dia in the default (two window) mode
28 >>
29 >> BUT plain
30 >> dia
31 >> incorrectly starts dia in the default mode.
32 >>
33 >> What am I missing?
34 >
35 > What's the output of "alias"? What happens if you execute "dia", in quotes?
36
37 No relevant aliases. The old shell is gone and new shells work so can't
38 test in original state. "dia" works fine. As Kerin stated, the problem
39 was that I needed to run hash -r in the old shell (or start a new one).
40
41 Thanks,
42 allan