From: Mikael Magnusson <mikachu@gmail.com>
To: shawn wilson <ag4ve.us@gmail.com>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: note metadata for files
Date: Thu, 3 Jul 2014 23:52:25 +0200 [thread overview]
Message-ID: <CAHYJk3S2bo3+_3M9+B9HjzHVYD9r9D4MrPVc_mZjDY7pumJFQA@mail.gmail.com> (raw)
In-Reply-To: <CAH_OBiefP4+xyLmK+fDr+Kn_G2MO1+CYU-7q3PU-rx4Q8UJEpQ@mail.gmail.com>
On 2 July 2014 19:59, shawn wilson <ag4ve.us@gmail.com> 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
prev parent reply other threads:[~2014-07-03 21:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-02 17:59 shawn wilson
2014-07-03 7:27 ` Roman Neuhauser
2014-07-03 21:44 ` Peter Stephenson
2014-07-04 3:55 ` shawn wilson
2014-07-04 10:50 ` François Revol
2014-07-06 22:32 ` shawn wilson
2014-07-07 9:25 ` François Revol
2014-07-03 21:52 ` Mikael Magnusson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHYJk3S2bo3+_3M9+B9HjzHVYD9r9D4MrPVc_mZjDY7pumJFQA@mail.gmail.com \
--to=mikachu@gmail.com \
--cc=ag4ve.us@gmail.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).