Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: note metadata for files
- X-seq: zsh-users 18921
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: shawn wilson <ag4ve.us@xxxxxxxxx>
- Subject: Re: note metadata for files
- Date: Thu, 3 Jul 2014 23:52:25 +0200
- Cc: Zsh Users <zsh-users@xxxxxxx>
- 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==
- In-reply-to: <CAH_OBiefP4+xyLmK+fDr+Kn_G2MO1+CYU-7q3PU-rx4Q8UJEpQ@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAH_OBiefP4+xyLmK+fDr+Kn_G2MO1+CYU-7q3PU-rx4Q8UJEpQ@mail.gmail.com>
On 2 July 2014 19:59, shawn wilson <ag4ve.us@xxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author