From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20431 invoked by alias); 11 Jan 2012 21:00:57 -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: 16727 Received: (qmail 12527 invoked from network); 11 Jan 2012 21:00:55 -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=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.216.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=upv2iTujG6KQQXTLzzdj+TjCwsV+cQB50bOvbLTkSP8=; b=i09SgNP5tsiGlAp5mpR2xyW4BMU9vQuY3PnooHnjHDvIwavmCoGQAtYMFQqiRC4iW+ w9c4CYIbJQyi7JDya15Z9t2CoO2uM+Ndywj5BuYVpjbgmp2IiIh1Fi8fBywSaCC2/VKu n/S1GfbJeO1AVWloLwJB2UCPw52/u+J/gFmcY= MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 11 Jan 2012 22:00:49 +0100 Message-ID: Subject: Re: Extended attributes (module and article) From: Mikael Magnusson To: Micah Elliott Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 On 11 January 2012 21:52, Micah Elliott wrote: > Hi! I was peeking at the `zsh/attr` module docs and trying to figure > out why it exists. Is it significantly different from the standard > getfattr/setfattr/attr utils (which already have nice completions and > look more featureful)? Does it serve to abstract say Linux's xattr and > Mac's xattr systems? I'm really only using Linux, but I guess that > could be a reason to use the zsh module. I wrote it for use with the *(e::) globbing syntax, where calling out to an external binary for hundreds/thousands of files is just way way too slow. eg #usage, *(e:fattr name:) or *(e:fattr name value:) function fattr() { local val zgetattr $REPLY user.$1 val 2>/dev/null [[ -n "$val" && ( -z "$2" || "$val" =~ "$2" ) ]] } -- Mikael Magnusson