Why does zsh timestamp history? [closed]
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
zsh history includes a timestamp.
Beyond knowing when a command was executed, what's the reason for this? What features might I lose if I disable this?
zsh command-history
closed as unclear what you're asking by Thomas Dickey, Mikel, Stephen Rauch, GAD3R, Romeo Ninov Oct 22 '17 at 6:05
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |Â
up vote
2
down vote
favorite
zsh history includes a timestamp.
Beyond knowing when a command was executed, what's the reason for this? What features might I lose if I disable this?
zsh command-history
closed as unclear what you're asking by Thomas Dickey, Mikel, Stephen Rauch, GAD3R, Romeo Ninov Oct 22 '17 at 6:05
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Why isn't that sufficient reason?
â Mikel
Oct 21 '17 at 11:47
Sure, but if thats the only reason. I'd happily disable it.
â ideasman42
Oct 21 '17 at 12:02
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
zsh history includes a timestamp.
Beyond knowing when a command was executed, what's the reason for this? What features might I lose if I disable this?
zsh command-history
zsh history includes a timestamp.
Beyond knowing when a command was executed, what's the reason for this? What features might I lose if I disable this?
zsh command-history
edited Oct 21 '17 at 18:06
Michael Mrozekâ¦
58.5k27184206
58.5k27184206
asked Oct 21 '17 at 11:32
ideasman42
221210
221210
closed as unclear what you're asking by Thomas Dickey, Mikel, Stephen Rauch, GAD3R, Romeo Ninov Oct 22 '17 at 6:05
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as unclear what you're asking by Thomas Dickey, Mikel, Stephen Rauch, GAD3R, Romeo Ninov Oct 22 '17 at 6:05
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, itâÂÂs hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
Why isn't that sufficient reason?
â Mikel
Oct 21 '17 at 11:47
Sure, but if thats the only reason. I'd happily disable it.
â ideasman42
Oct 21 '17 at 12:02
add a comment |Â
Why isn't that sufficient reason?
â Mikel
Oct 21 '17 at 11:47
Sure, but if thats the only reason. I'd happily disable it.
â ideasman42
Oct 21 '17 at 12:02
Why isn't that sufficient reason?
â Mikel
Oct 21 '17 at 11:47
Why isn't that sufficient reason?
â Mikel
Oct 21 '17 at 11:47
Sure, but if thats the only reason. I'd happily disable it.
â ideasman42
Oct 21 '17 at 12:02
Sure, but if thats the only reason. I'd happily disable it.
â ideasman42
Oct 21 '17 at 12:02
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
8
down vote
zsh history includes a timestamp, if the EXTENDED_HISTORY
feature is enabled, or if the SHARE_HISTORY
feature is enabled; in the latter case, timestamps are used so multiple shells can read each othersâ history accurately â they only need to read any new commands added since the last time they read the history file, and they can do so even when the history file is rewritten.
These features are enabled or disabled using setopt
:
setopt extendedhistory
setopt sharehistory
will enable them, while
setopt noextendedhistory
setopt nosharehistory
will disable them.
If you want to keep shared histories, youâÂÂll need to keep the extended timestamps (but you donâÂÂt need to explicitly enable the EXTENDED_HISTORY
feature; the SHARE_HISTORY
feature is self-sufficient).
Note that extended history tells you not only when a command was executed, but also how long it took to run, which can be useful in some cases.
The History section of the documentation has all the details.
add a comment |Â
up vote
3
down vote
If I recall correctly, ZSH uses the time stamp to reorder the historical commands when you have more than one session opened.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
8
down vote
zsh history includes a timestamp, if the EXTENDED_HISTORY
feature is enabled, or if the SHARE_HISTORY
feature is enabled; in the latter case, timestamps are used so multiple shells can read each othersâ history accurately â they only need to read any new commands added since the last time they read the history file, and they can do so even when the history file is rewritten.
These features are enabled or disabled using setopt
:
setopt extendedhistory
setopt sharehistory
will enable them, while
setopt noextendedhistory
setopt nosharehistory
will disable them.
If you want to keep shared histories, youâÂÂll need to keep the extended timestamps (but you donâÂÂt need to explicitly enable the EXTENDED_HISTORY
feature; the SHARE_HISTORY
feature is self-sufficient).
Note that extended history tells you not only when a command was executed, but also how long it took to run, which can be useful in some cases.
The History section of the documentation has all the details.
add a comment |Â
up vote
8
down vote
zsh history includes a timestamp, if the EXTENDED_HISTORY
feature is enabled, or if the SHARE_HISTORY
feature is enabled; in the latter case, timestamps are used so multiple shells can read each othersâ history accurately â they only need to read any new commands added since the last time they read the history file, and they can do so even when the history file is rewritten.
These features are enabled or disabled using setopt
:
setopt extendedhistory
setopt sharehistory
will enable them, while
setopt noextendedhistory
setopt nosharehistory
will disable them.
If you want to keep shared histories, youâÂÂll need to keep the extended timestamps (but you donâÂÂt need to explicitly enable the EXTENDED_HISTORY
feature; the SHARE_HISTORY
feature is self-sufficient).
Note that extended history tells you not only when a command was executed, but also how long it took to run, which can be useful in some cases.
The History section of the documentation has all the details.
add a comment |Â
up vote
8
down vote
up vote
8
down vote
zsh history includes a timestamp, if the EXTENDED_HISTORY
feature is enabled, or if the SHARE_HISTORY
feature is enabled; in the latter case, timestamps are used so multiple shells can read each othersâ history accurately â they only need to read any new commands added since the last time they read the history file, and they can do so even when the history file is rewritten.
These features are enabled or disabled using setopt
:
setopt extendedhistory
setopt sharehistory
will enable them, while
setopt noextendedhistory
setopt nosharehistory
will disable them.
If you want to keep shared histories, youâÂÂll need to keep the extended timestamps (but you donâÂÂt need to explicitly enable the EXTENDED_HISTORY
feature; the SHARE_HISTORY
feature is self-sufficient).
Note that extended history tells you not only when a command was executed, but also how long it took to run, which can be useful in some cases.
The History section of the documentation has all the details.
zsh history includes a timestamp, if the EXTENDED_HISTORY
feature is enabled, or if the SHARE_HISTORY
feature is enabled; in the latter case, timestamps are used so multiple shells can read each othersâ history accurately â they only need to read any new commands added since the last time they read the history file, and they can do so even when the history file is rewritten.
These features are enabled or disabled using setopt
:
setopt extendedhistory
setopt sharehistory
will enable them, while
setopt noextendedhistory
setopt nosharehistory
will disable them.
If you want to keep shared histories, youâÂÂll need to keep the extended timestamps (but you donâÂÂt need to explicitly enable the EXTENDED_HISTORY
feature; the SHARE_HISTORY
feature is self-sufficient).
Note that extended history tells you not only when a command was executed, but also how long it took to run, which can be useful in some cases.
The History section of the documentation has all the details.
edited Oct 21 '17 at 21:49
answered Oct 21 '17 at 19:08
Stephen Kitt
144k22313378
144k22313378
add a comment |Â
add a comment |Â
up vote
3
down vote
If I recall correctly, ZSH uses the time stamp to reorder the historical commands when you have more than one session opened.
add a comment |Â
up vote
3
down vote
If I recall correctly, ZSH uses the time stamp to reorder the historical commands when you have more than one session opened.
add a comment |Â
up vote
3
down vote
up vote
3
down vote
If I recall correctly, ZSH uses the time stamp to reorder the historical commands when you have more than one session opened.
If I recall correctly, ZSH uses the time stamp to reorder the historical commands when you have more than one session opened.
answered Oct 21 '17 at 12:11
Huygens
4,69311930
4,69311930
add a comment |Â
add a comment |Â
Why isn't that sufficient reason?
â Mikel
Oct 21 '17 at 11:47
Sure, but if thats the only reason. I'd happily disable it.
â ideasman42
Oct 21 '17 at 12:02