Gentoo Archives: gentoo-user

From: "Canek Peláez Valdés" <caneko@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] trouble overriding a command name
Date: Thu, 28 Aug 2014 16:25:26
Message-Id: CADPrc83MKkAJ7ZhJR0Jd4dSCsX8k+ArUPOEQhRSPOhiQN2X9Dg@mail.gmail.com
In Reply to: [gentoo-user] trouble overriding a command name by gottlieb@nyu.edu
1 On Thu, Aug 28, 2014 at 10:42 AM, <gottlieb@×××.edu> wrote:
2 > I know this is trivial and apologize in advance for what must be a simple
3 > (non-gentoo) error on my part.
4 >
5 > In /home/gottlieb/bin/dia I have the following
6 > #!/bin/bash
7 > /usr/bin/dia --integrated
8 >
9 > ls -l /home/gottlieb/bin/dia gives
10 > -rwxr-xr-x 1 gottlieb gottlieb 38 Aug 28 11:28 /home/gottlieb/bin/dia
11 >
12 > echo $PATH gives
13 > /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
14 >
15 > which dia gives
16 > /home/gottlieb/bin/dia
17 >
18 > `which dia`
19 > correctly starts dia in "integrated" (one window) mode
20 >
21 > /home/gottlieb/bin/dia
22 > correctly starts in integrated mode
23 >
24 > /usr/bin/dia
25 > correctly starts dia in the default (two window) mode
26 >
27 > BUT plain
28 > dia
29 > incorrectly starts dia in the default mode.
30 >
31 > What am I missing?
32
33 What's the output of "alias"? What happens if you execute "dia", in quotes?
34
35 Regards.
36 --
37 Canek Peláez Valdés
38 Profesor de asignatura, Facultad de Ciencias
39 Universidad Nacional Autónoma de México

Replies

Subject Author
Re: [gentoo-user] trouble overriding a command name gottlieb@×××.edu