Ticket #47 (new defect)

Opened 2 years ago

Wildcards and command names

Reported by: gvwilson Assigned to: gvwilson
Priority: major Milestone: Someday
Component: lectures Version:
Keywords: Cc:

Description

* Wildcards only work with filenames, not with command names o ta* does not find the tabulate command

That's not true. The shell doesn't discriminate between wildcards in the first word.

1 $ cd /tmp 2 $ rm -f date 3 $ echo echo foo >date 4 $ hash -r 5 $ dat? 6 2006-07-15 17:17:57 +0100 Sat 7 $ chmod +x date 8 $ PATH=.:$PATH 9 $ hash -r

10 $ dat? 11 foo 12 $

(5) The wildcard expands dat?' to date' which then gets looked for through $PATH finding /bin/date.

(10) Once /tmp/date is executable, that gets found instead iff `.' is earlier than /bin in $PATH.

I agree that `dat?' in /tmp won't search $PATH for something that matches. But that's different from saying wildcards don't work with command names.