zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: <zsh-users@zsh.org>
Subject: Re: An example of writing a custom history file?
Date: Mon, 15 Dec 2014 08:14:40 -0800	[thread overview]
Message-ID: <141215081440.ZM25053@torch.brasslantern.com> (raw)
In-Reply-To: <CANCp2gaAnuFLuhWfzaTn0_KjX-VqsBHEZgGZ0M1U2w6Nw6C58A@mail.gmail.com>

On Dec 15,  9:26am, Rocky Bernstein wrote:
} 
} Almost there! The only remaining problem is now how write the accumulated
} history. For that, I assume I use fc -W *filename* or fc -A *filename*.

I don't really mind helping you out here, but if you were to actually
read the documentation for the "fc" command or even look more closely
at the way it's used in sticky-note you should be able to figure this
out for yourself.

}     #!/usr/bin/zsh
}     fc -ap /tmp/example_history 1000

You need to supply another argument to "fc -ap" telling it what the
maximum size of the saved file is.  Then that number of lines will
be saved automatically when the current function goes out of scope.


  reply	other threads:[~2014-12-15 16:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-15  1:38 Rocky Bernstein
2014-12-15  2:53 ` Bart Schaefer
2014-12-15  7:09   ` Rocky Bernstein
2014-12-15  8:37     ` Bart Schaefer
2014-12-15 14:26       ` Rocky Bernstein
2014-12-15 16:14         ` Bart Schaefer [this message]
2014-12-15 17:05           ` Rocky Bernstein
2014-12-15 17:46             ` Peter Stephenson
2014-12-15 18:22             ` Mikael Magnusson
2014-12-16  3:58               ` Rocky Bernstein
2014-12-15 18:26             ` Bart Schaefer
2014-12-15 18:34               ` Mikael Magnusson
2014-12-16 11:36                 ` Peter Stephenson
2014-12-16  5:57               ` Rocky Bernstein

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=141215081440.ZM25053@torch.brasslantern.com \
    --to=schaefer@brasslantern.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).