From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18211 invoked by alias); 14 Aug 2013 10:03:27 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17923 Received: (qmail 6141 invoked from network); 14 Aug 2013 10:03:11 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at samsung.com does not designate permitted sender hosts) X-AuditID: cbfec7f5-b7f5f6d00000105f-f3-520b53805c3c Date: Wed, 14 Aug 2013 10:53:04 +0100 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: "\rm -f" stops after the 1st glob not found Message-id: <20130814105304.0d21eb8d@pwslap01u.europe.root.pri> In-reply-to: References: Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphluLIzCtJLcpLzFFi42I5/e/4Fd2GYO4gg/2/9Cx2nFzJ6MDoserg B6YAxigum5TUnMyy1CJ9uwSujEO/tjIV/OCoWPXqK2MDYwN7FyMnh4SAicTix/cZIWwxiQv3 1rN1MXJxCAksZZR4fu4aO5TDJLH82zFmkCoWAVWJq3v+MYHYbAKGElM3zQbrFhEQlVi+YjPY VGEBC4n/dxaxgNi8AvYSD9+/ZgOxOQWCJW61ngXq5QAaGiBxfbsxSJhfQF/i6t9PTBBH2EvM vHKGEaJVUOLH5HtgY5gFtCQ2b2tihbDlJTavecs8gVFgFpKyWUjKZiEpW8DIvIpRNLU0uaA4 KT3XSK84Mbe4NC9dLzk/dxMjJAS/7mBceszqEKMAB6MSD+8Da64gIdbEsuLK3EOMEhzMSiK8 Bzy4g4R4UxIrq1KL8uOLSnNSiw8xMnFwSjUwVpY3Se7bn6bu/YX5mqy69h2pUyae9X/uhch8 eevMLXOqwDl25hye+m4mF+PsmjQedpfbpqk3GD44q0Y8OLtpxtSnwYanInSq37IsmdMb47v5 /OSLEsc7989YxdmyuUTqoEDoAQ1OSWY5O/7v7hLq9m42Frsjn1w5coHbKHvCGbm63UYWOy4q sRRnJBpqMRcVJwIAYbz1jB8CAAA= On Wed, 14 Aug 2013 06:25:27 -0300 Leonardo Barbosa wrote: > I'm sure that's a simple questions, but the keywords are so common > that i couldn't find the answer by googling them. > > My problem is this, when i type: > > \rm -f *.aux *.blg *.out *.ps *.log *.toc *.tcp *.idx *.bak *.tps > *.ilg *.ind *.sty *.bst *.bbl > > zsh stops in the first glob it doesn't find. How could i fix this? You need to change the options (using "setopt" in ~/.zshrc). There are various things you can do. setopt NULL_GLOB simply removes completely all command line entries where the pattern didn't expand to anything. setopt CSH_NULL_GLOB does the same, but if all patterns failed to expand it's an error (a bit safer). setopt NO_NOMATCH leaves the argument unmodified --- this is what some other shells do, so it might be your best bet. That means rm -f will try to remove files called e.g. "*.bak", but the -f means that's OK. There's a summary of all (well, some of) this in "From Bash to Z Shell" chapter 9, page 211 (see www.bash2zsh.com for information about the book). pws