Date: Mon, 15 Jan 2007 14:45:57 -0800 From: Chuck Swiger <cswiger@mac.com> To: Gary Kline <kline@tao.thought.org> Cc: Giorgos Keramidas <keramida@ceid.upatras.gr>, freebsd-questions@freebsd.org Subject: Re: perl substitution question Message-ID: <1489820B-4B25-4B8F-89F1-6FF7E74533A6@mac.com> In-Reply-To: <20070115222925.GA39166@thought.org> References: <20070114024551.GA21847@thought.org> <20070114034148.GC2734@kobe.laptop> <20070114201546.GA28048@thought.org> <20070114203104.GB3404@kobe.laptop> <20070114214410.GB24039@thought.org> <E284B392-C672-452A-816F-9CCB166C755D@mac.com> <20070115220422.GA2250@kobe.laptop> <20070115222925.GA39166@thought.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Jan 15, 2007, at 2:29 PM, Gary Kline wrote:
>> OMG! I managed to break a new shell war :)
>>
>> /me ducks and runs very far away
>
> No! no, cometh backeth, Giorgos! No war, just peace, love
> and flowers:-)
% cd /usr/ports/mail/imap-uw/ && make extract && cd work/imap-2004g
% tail -3 Makefile
# A monument to a hack of long ago and far away...
love:
@echo not war?
> Actually, I do use zsh, just have no clue how to
> set noglob. I was going to ask, but didn't want to show my
> ignorance. [[ been using zsh for 16, 17 years... ]]
[ ... ]
> Chuck, exactly what does noglob do? How to set/unset, please?
noglob is a keyword (a "precommand modifier", specifically) that
disables wildcard filename globbing:
% cd /tmp
% touch 'a*'
% touch 'ab'
% ls a*
a* ab
% noglob ls a*
a*
This trivial case isn't too useful, but consider wanting to copy
all .jpg files from your home directory on another machine to the
local machine via scp or rsync:
noglob scp kline@machine:*.jpg .
It's also amazingly handy in conjunction with the "find" command:
noglob find /usr/obj -name *.a
...so much so that I do:
alias find='noglob find'
...in my ZSH environment.
--
-Chuck
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1489820B-4B25-4B8F-89F1-6FF7E74533A6>
