* One $HISTFILE to rule them all
@ 2009-03-09 14:05 TjL
2009-03-09 16:11 ` Peter Stephenson
0 siblings, 1 reply; 4+ messages in thread
From: TjL @ 2009-03-09 14:05 UTC (permalink / raw)
To: Zsh Users List
I assume that most of you are already familiar with Dropbox (www.getdropbox.com)
If not, the short version is this: 2gb of diskspace, free,
automatically sync'd across multiple computers (Win, Mac, Ubuntu,
perhaps other Un*x variants as well). Backed by Amazon.com's S3
service.
SHAMELESS PLUG: If you haven't signed up yet, use this link
http://tr.im/dropboxsignup
aka
https://www.getdropbox.com/referrals/NTE4NDE0OQ~~
and you'll get 2.25GB instead of 2.0GB (and I get some extra space too)
</commercial> :-)
Ok, now:
One of the great features of Dropbox for me has been syncing my shell
scripts folder. I can now put them all in one place, edit them on any
computer, and have them all updated automatically. (I explained how I
set this up here:
http://tntluoma.com/shell-scripts/dropbox-bin/ )
Then I realized that I could sync my .zshenv file using 'ln -s'
ln -s ~/Dropbox/Zsh/Env.txt ~/.zshenv
My latest question is this:
Is there a way for me to change my $HISTFILE to something like
~/Dropbox/Zsh/History.txt and have zsh save the history from any shell
on any computer to the same file?
I wasn't sure how $HISTFILE would react to being written to from
several different places.
Here is what I currently have set:
$ fgrep -i hist ~/.zshenv|sort
HISTFILE=$HOME/.zhistory
HISTSIZE=SAVEHIST=99999
setopt APPEND_HISTORY
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_FCNTL_LOCK
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_NO_STORE
setopt HIST_SAVE_NO_DUPS
setopt HIST_VERIFY
setopt INC_APPEND_HISTORY
Note: I like I really big history file, because I often find good
stuff in there later that I didn't realize (at the time) I would want
again later.
I just added some of these after reading 'zshall'
If you have any suggestions, warnings, etc, I would very much like to
hear them :-)
Thanks!
TjL
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: One $HISTFILE to rule them all
2009-03-09 14:05 One $HISTFILE to rule them all TjL
@ 2009-03-09 16:11 ` Peter Stephenson
2009-03-09 16:54 ` TjL
0 siblings, 1 reply; 4+ messages in thread
From: Peter Stephenson @ 2009-03-09 16:11 UTC (permalink / raw)
To: Zsh Users List
On Mon, 9 Mar 2009 10:05:40 -0400
TjL <luomat@gmail.com> wrote:
>
> SHAMELESS PLUG: If you haven't signed up yet, use this link
>
> http://tr.im/dropboxsignup
> aka
> https://www.getdropbox.com/referrals/NTE4NDE0OQ~~
>
> and you'll get 2.25GB instead of 2.0GB (and I get some extra space too)
I've just done that. It's lucky I found
http://wiki.getdropbox.com/TipsAndTricks/TextBasedLinuxInstall or it would
have been just another form of uploadable remote storage...
> Is there a way for me to change my $HISTFILE to something like
> ~/Dropbox/Zsh/History.txt and have zsh save the history from any shell
> on any computer to the same file?
>
> I wasn't sure how $HISTFILE would react to being written to from
> several different places.
It should "just work" as long as you leave a dropbox-sized gap (which
appears to be of the order of a minute or so) between doing anything on a
system with one copy and a system with another copy, so that they stay
synced without confusion over who's written what---there's no way of doing
file locking since you're always at the mercy of that time lag whatever you
write; you just can't tell what files are currently visible on another
synced system. This is pretty obvious and applies to all files down there.
Other than that, I can't offhand see any new issues compared with other
forms of syncing history between multiple computers, which many of us have
been doing for a long time.
By the way, leaking information from another thread entirely on zsh-workers
(starts zsh-workers/26702):
Bart wrote:
> } Obviously any alternative opinions would be useful. Currently that
> } means Bart, but both of us would be very interested in getting new
> } apprentice source code gurus...
>
> Leak some of that sentiment onto zsh-users. Maybe potential apprentices
> just aren't reading -workers.
--
Peter Stephenson <pws@csr.com> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: One $HISTFILE to rule them all
2009-03-09 16:11 ` Peter Stephenson
@ 2009-03-09 16:54 ` TjL
2009-03-09 17:18 ` Michael Hernandez
0 siblings, 1 reply; 4+ messages in thread
From: TjL @ 2009-03-09 16:54 UTC (permalink / raw)
To: Peter Stephenson; +Cc: Zsh Users List
On Mon, Mar 9, 2009 at 12:11 PM, Peter Stephenson <pws@csr.com> wrote:
> On Mon, 9 Mar 2009 10:05:40 -0400
> TjL <luomat@gmail.com> wrote:
>>
>> http://tr.im/dropboxsignup
>> aka
>> https://www.getdropbox.com/referrals/NTE4NDE0OQ~~
>>
>> and you'll get 2.25GB instead of 2.0GB (and I get some extra space too)
>
> I've just done that. It's lucky I found
> http://wiki.getdropbox.com/TipsAndTricks/TextBasedLinuxInstall or it would
> have been just another form of uploadable remote storage...
Oh, cool. I wonder if I can use that to make it sync with my shell
account at Dreamhost. That would be truly excellent.
>> Is there a way for me to change my $HISTFILE to something like
>> ~/Dropbox/Zsh/History.txt and have zsh save the history from any shell
>> on any computer to the same file?
>>
>> I wasn't sure how $HISTFILE would react to being written to from
>> several different places.
>
> It should "just work" as long as you leave a dropbox-sized gap (which
> appears to be of the order of a minute or so) between doing anything on a
> system with one copy and a system with another copy, so that they stay
> synced without confusion over who's written what---there's no way of doing
> file locking since you're always at the mercy of that time lag whatever you
> write; you just can't tell what files are currently visible on another
> synced system. This is pretty obvious and applies to all files down there.
> Other than that, I can't offhand see any new issues compared with other
> forms of syncing history between multiple computers, which many of us have
> been doing for a long time.
The good news is that I've seen Dropbox deal with multiple-writes
before, and it handles it pretty well. You end up with a file
"Filename.(hostname).ext" or something like that, which shows you
which machine it was from.
(Oh, also forgot to mention Dropbox ***SAVES REVISIONS*** of changes
that you make. i.e. "I don't have to learn git/subversion to get
version tracking" -- at least sufficient enough for my
one-man-who-writes-shell-scripts purposes)
> By the way, leaking information from another thread entirely on zsh-workers
> (starts zsh-workers/26702):
>
> Bart wrote:
>> } Obviously any alternative opinions would be useful. Currently that
>> } means Bart, but both of us would be very interested in getting new
>> } apprentice source code gurus...
>>
>> Leak some of that sentiment onto zsh-users. Maybe potential apprentices
>> just aren't reading -workers.
I wish I could help, but other than some (often crude) shell
scripting, I don't have any programming experience to offer.
TjL
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: One $HISTFILE to rule them all
2009-03-09 16:54 ` TjL
@ 2009-03-09 17:18 ` Michael Hernandez
0 siblings, 0 replies; 4+ messages in thread
From: Michael Hernandez @ 2009-03-09 17:18 UTC (permalink / raw)
To: TjL; +Cc: zsh-users
On Mar 9, 2009, at 12:54 PM, TjL wrote:
>
> Oh, cool. I wonder if I can use that to make it sync with my shell
> account at Dreamhost. That would be truly excellent.
FWIW, I use subversion to sync my shell files, and I use dreamhost to
host my subversion. ;)
--Mike H
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-03-09 17:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-09 14:05 One $HISTFILE to rule them all TjL
2009-03-09 16:11 ` Peter Stephenson
2009-03-09 16:54 ` TjL
2009-03-09 17:18 ` Michael Hernandez
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).