[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: aliased command always considered in $PATH (-> is tab-completed)
From: |
Chet Ramey |
Subject: |
Re: aliased command always considered in $PATH (-> is tab-completed) |
Date: |
Fri, 02 Apr 2004 13:51:30 -0500 |
User-agent: |
Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.6) Gecko/20040113 |
Jan.Stary@ff.cuni.cz wrote:
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu'
-DCONF_VENDOR='redhat' -DSHELL -DHAVE_CONFIG_H -D_GNU_SOURCE
-D_FILE_OFFSET_BITS=64 -I. -I. -I./include -I./lib -I/usr/include -O2
-march=i386 -mcpu=i686
uname output: Linux praha1.ff.cuni.cz 2.4.9-e.38 #1 Thu Feb 19 05:40:22 CET
2004 i686 unknown
Machine Type: i386-redhat-linux-gnu
Bash Version: 2.05
Patch Level: 8
Release Status: release
Description:
Hello. If you setup an alias such as
antiword='antiword -s -w 79 -m 8859-2.txt'
then typing 'antiword' is gets tab-completed, even if there is not
really any 'antiword' command in $PATH. Similarly with other aliases.
Of course, since the aliases will be expanded even before the command is
expanded and executed. Should not completion reflect reality?
Is this intentional? Are all aliased commands considered to 'be in
$PATH' and therefore subject to tab-completion? Is there a way to make
bash check that the 'actual' command (which starts the alias) is
really in $PATH?
Bash does not check the contents of an alias expansion -- it simply
expands the alias and uses the new words.
Chet