From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6310 invoked by alias); 3 Jul 2014 21:52:43 -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: 18921 Received: (qmail 22690 invoked from network); 3 Jul 2014 21:52:29 -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=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=FA752+aMOklb5I1muT9B3meBZ0RWH4b+hPluDrMFAWY=; b=CF38orbSvYdMmupTkRRn4Su++395W8MJ9pFuRVdcZS83EVUjFFGrCawUJcCZaOy3YX 8QWSfblJZFBWBSUNH8VUNy7ClB59P/XtqR0fW0S76h2qVjm+1T9GHf9BhVE8hzOGW7rC /pSq5xBodUMpWm+V5JZFsaX7BePDo3RyXwzREHBXQnEfHLwjnbaVhUjsDy8JWfN71pvU pgje3DTH475ChXdCSaw+vyDuAzLRHE3y9AfwDXC0sFN318GBm7zQmMcf6BiFXGTC6YrG AstBqR5f8tE8kY7CVm+8J+PUE3dKGHgGlWcagAm7R2QFieGbmfby8RanjgH5mILNBAHm zggw== MIME-Version: 1.0 X-Received: by 10.140.91.66 with SMTP id y60mr11338871qgd.58.1404424346007; Thu, 03 Jul 2014 14:52:26 -0700 (PDT) In-Reply-To: References: Date: Thu, 3 Jul 2014 23:52:25 +0200 Message-ID: Subject: Re: note metadata for files From: Mikael Magnusson To: shawn wilson Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 On 2 July 2014 19:59, shawn wilson wrote: > Maybe not a zsh specific question, but... > > Does anyone have a system for attaching notes to a file? > > The issue is I track down why a change was made to a file > (annotate/blame/whatever) and then I remember that I've tracked down > that change before. It would be useful if I could attach a note to > files outside of any repo (or the repo they belong to anyway) that > pops something up (maybe desktop-notify) when I look at the file (not > stat, but manually grep/cat/less/diff/whatever from a cli). > > This could almost be a shell script, but I'm not sure how to make an > event that would trigger the script with a filename parameter - is > there a way to do this? Closest I have is http://mika.l3ib.org/code/zsh-functions/note http://cgit.mika.l3ib.org/cgit/zsh-cvs/commit/?h=mika&id=45550f3971d50f8aa0ba63b1a55ce6dd28662200 http://cgit.mika.l3ib.org/cgit/zsh-cvs/commit/?h=mika&id=2d0d2e6750383151551b62980f322ac90de07ec4 zstyle ':completion:dirprop:*' file-list dirprop=user.notes zstyle ':completion:dirprop:*' dirinfo-format '%f '${(%):-%F{11}}%i${(%):-%f} zle -C dirprop complete-word _generic bindkey "^_^V" dirprop (or just set the style for your default context to always disable the notes on tab completion, but it overrides filetype coloring which is why i don't). Also note that most programs will silently delete all xattrs when you edit/copy/etc a file. -- Mikael Magnusson