From: Roman Neuhauser <neuhauser@sigpipe.cz>
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 09:27:25 +0200 [thread overview]
Message-ID: <20140703072725.GC11492@isis.sigpipe.cz> (raw)
In-Reply-To: <CAH_OBiefP4+xyLmK+fDr+Kn_G2MO1+CYU-7q3PU-rx4Q8UJEpQ@mail.gmail.com>
# ag4ve.us@gmail.com / 2014-07-02 13:59:24 -0400:
> Maybe not a zsh specific question, but...
>
> Does anyone have a system for attaching notes to a file?
git, mercurial and others
> 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.
git notes might be useful
> It would be useful if I could attach a note to files outside of any
> repo
you can run git init anywhere, like in /etc.
> (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?
see preexec in zshmisc(1), you can tokenize the first argument with
"${(@Z:C:)1}" (zshezpn(1)), and see if any word in the resulting array
names the file you're interested in.
--
roman
next prev parent reply other threads:[~2014-07-03 7:36 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 [this message]
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
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=20140703072725.GC11492@isis.sigpipe.cz \
--to=neuhauser@sigpipe.cz \
--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).