<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Zsh on 答えを知りたい</title><link>https://hack.ironsand.net/tags/zsh/</link><description>Recent content in Zsh on 答えを知りたい</description><generator>Hugo -- 0.147.9</generator><language>en-US</language><lastBuildDate>Wed, 18 Oct 2017 22:47:37 +0000</lastBuildDate><atom:link href="https://hack.ironsand.net/tags/zsh/index.xml" rel="self" type="application/rss+xml"/><item><title>zshでhistoryに実行時間も残す方法</title><link>https://hack.ironsand.net/2017/howto-keep-excuted-time-in-zsh-history/</link><pubDate>Wed, 18 Oct 2017 22:47:37 +0000</pubDate><guid>https://hack.ironsand.net/2017/howto-keep-excuted-time-in-zsh-history/</guid><description>&lt;p>&lt;code>bash&lt;/code>だと&lt;code>HISTTIMEFORMAT=&amp;quot;[%F %T] &amp;quot;&lt;/code>とか&lt;code>~/.bashrc&lt;/code>に書いておけばログに実行した日時も残しておけるんだけど&lt;code>zsh&lt;/code>だと&lt;code>HISTTIMEFORMAT&lt;/code>がないらしいので方法を調べてみた。&lt;/p>
&lt;h3 id="設定しなくてok">設定しなくてOK&lt;/h3>
&lt;p>デフォルトで使えるようになってるらしい&lt;/p>
&lt;pre tabindex="0">&lt;code>$ history -E
1 2.12.2013 14:19 history -E
$ history -i
1 2013-12-02 14:19 history -E
$ history -D
1 0:00 history -E
2 0:00 history -i
&lt;/code>&lt;/pre>&lt;p>だけでOK。&lt;/p>
&lt;h3 id="参考">参考&lt;/h3>
&lt;p>&lt;a href="https://unix.stackexchange.com/questions/103398/datetime-stamp-when-running-history-command-in-zsh-shell">https://unix.stackexchange.com/questions/103398/datetime-stamp-when-running-history-command-in-zsh-shell&lt;/a>&lt;/p></description></item></channel></rss>