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

Re: Failing to write to history file if containing directory doesn't exist



On Oct 9, 12:32am, Nikolai Weibull wrote:
}
} > every time the history is updated.  That would make it impossible for
} > a user with HISTFILE=~/.zsh/history to do something as simple as:
} >
} > % mv .zsh .zsh-4.3.4
} > % ln -s .zsh-4.3.4 .zsh
} >
} > without first unsetting and later setting HISTFILE, since the
} > directory would be recreated between the two commands.
} 
} Only under the condition that HISTFILE is written to between the two
} commands.

Which will be always, if the SHARE_HISTORY and/or INC_APPEND_HISTORY
options are set.

} I still want to play a "don't lose data without trying to save it"
} card, but it seems I'm the only one playing cards of that suite.

History is only maintained for interactive shells, so you might get
more traction with an option to prompt the user to create the directory
and/or fix $HISTFILE when the file does not exist or is not writable.



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