Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: One $HISTFILE to rule them all



On Mon, Mar 9, 2009 at 12:11 PM, Peter Stephenson <pws@xxxxxxx> wrote:
> On Mon, 9 Mar 2009 10:05:40 -0400
> TjL <luomat@xxxxxxxxx> 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



Messages sorted by: Reverse Date, Date, Thread, Author