🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

6 total messages Started by William W. Carlson Wed, 12 Jul 1989 13:22
Bug/Feature in globbing
#301
Author: William W. Carlson
Date: Wed, 12 Jul 1989 13:22
13 lines
1014 bytes
I really like bash a great deal, but one "feature" I find quite
annoying.  Whenever globbing fails (i.e. no match), it leaves the
unglobbed string as is.  (i.e. if I type "ls foo* bar*" and there is a
file in the current directory called foo.c but none starting with
"bar", ls gets passed "ls foo.c bar*" and of course says "bar* not
found."  This feature is particularly disturbing in aliases.  Do
people think this is a "bug" or a "feature"?  If it is a bug, I'd
really like it fixed.  If it is a feature, I'd like for there to be
some way (perhaps set -no_bogus_globbing) to disable it.

Bill Carlson
wwc@engr.wisc.edu
Re: Bug/Feature in globbing
#302
Author: Brian Glendenning
Date: Wed, 12 Jul 1989 15:57
6 lines
714 bytes
If it comes to a vote (:-) I think it's a feature.

--
	  Brian Glendenning - Radio astronomy, University of Toronto
brian@radio.astro.utoronto.ca uunet!utai!radio!brian  glendenn@utorphys.bitnet
Re: Bug/Feature in globbing
#303
Author: Rich Salz
Date: Wed, 12 Jul 1989 17:29
10 lines
774 bytes
Given a directory with the two files "virus" and "very" in it, then
	echo v* z*
will do the following for sh
	very virus z*
and it will do the following for csh
	very virus
if you do "set nonomatch" in csh, then you'll get the sh behavior.
-- 
Please send comp.sources.unix-related mail to rsalz@uunet.uu.net.
Use a domain-based address or give alternate paths, or you may lose out.
Bug/Feature in globbing
#304
Author: Brian Fox
Date: Wed, 12 Jul 1989 18:29
25 lines
1550 bytes
   Date: 12 Jul 89 13:22:31 GMT
   From: cica!ctrsol!sdsu!polyslo!indri!engr!wwc@cis.ohio-state.edu  (William W. Carlson)
   Organization: University of Wisconsin-Madison
   Sender: bug-bash-request@prep.ai.mit.edu


   I really like bash a great deal, but one "feature" I find quite
   annoying.  Whenever globbing fails (i.e. no match), it leaves the
   unglobbed string as is.  (i.e. if I type "ls foo* bar*" and there is a
   file in the current directory called foo.c but none starting with
   "bar", ls gets passed "ls foo.c bar*" and of course says "bar* not
   found."  This feature is particularly disturbing in aliases.
   Do people think this is a "bug" or a "feature"?  If it is a bug, I'd
   really like it fixed.  If it is a feature, I'd like for there to be
   some way (perhaps set -no_bogus_globbing) to disable it.

   Bill Carlson
   wwc@engr.wisc.edu

Well, this was a design decision.  I think that it is the best of
possible alternatives.  Would you like to present an alternative that
you feel is better?

Brian
Re: Bug/Feature in globbing
#308
Author: George Robbins
Date: Wed, 12 Jul 1989 22:31
20 lines
1395 bytes
In article <WWC.89Jul12082231@boole.ece.wisc.edu> wwc@boole.ece.wisc.edu (William W. Carlson) writes:
> 
> ... ls gets passed "ls foo.c bar*" and of course says "bar* not
> found."  This feature is particularly disturbing in aliases.  Do
> people think this is a "bug" or a "feature"?  If it is a bug, I'd
> really like it fixed.  If it is a feature, I'd like for there to be
> some way (perhaps set -no_bogus_globbing) to disable it.

But that's the elegant, if preverse, way that bourne style shells are
supposed to handle unresolved globbing attempts.  What you are asking
for is "set -csh_style_bogus_glob_error_messages_and_terminate" option.

8-)

Such a mode does have it's merits, though it's necessity is arguable.

-- 
George Robbins - now working for,	uucp: {uunet|pyramid|rutgers}!cbmvax!grr
but no way officially representing	arpa: cbmvax!grr@uunet.uu.net
Commodore, Engineering Department	fone: 215-431-9255 (only by moonlite)
Re: Bug/Feature in globbing
#307
Author: Chet Ramey
Date: Wed, 12 Jul 1989 23:11
25 lines
1591 bytes
In article <WWC.89Jul12082231@boole.ece.wisc.edu> wwc@boole.ece.wisc.edu (William W. Carlson) writes:

? Whenever globbing fails (i.e. no match), it leaves the
? unglobbed string as is.  (i.e. if I type "ls foo* bar*" and there is a
? file in the current directory called foo.c but none starting with
? "bar", ls gets passed "ls foo.c bar*" and of course says "bar* not
? found."  This feature is particularly disturbing in aliases.  Do
? people think this is a "bug" or a "feature"?  If it is a bug, I'd
? really like it fixed.  If it is a feature, I'd like for there to be
? some way (perhaps set -no_bogus_globbing) to disable it.


This is because (all together now) BASH IS NOT CSH! It is a
POSIX-style/Bourne Shell clone.  Bourne-style shells leave a word
unchanged if it expands into nothing. 

I vote to keep it, in the interest of sh compatibility.

Chet


Chet Ramey			"We are preparing to think about contemplating 
Network Services Group, CWRU	 preliminary work on plans to develop a
chet@cwjcc.INS.CWRU.Edu		 schedule for producing the 10th Edition of 
				 the Unix Programmers Manual." -- Andrew Hume
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads