diff options
author | Robby Russell <robby@planetargon.com> | 2013-12-02 23:38:26 -0800 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2013-12-02 23:38:26 -0800 |
commit | 44c7fd976b7d5b1d9f168bbf3ecdb09720a793e2 (patch) | |
tree | 7f8204a00f7c3228784639901fd36e1b1fef91b8 | |
parent | f574849c0a1da879f5e23cea21ef76f6e10e0830 (diff) | |
parent | 77cf8696053d5256b4deb7cddc79c31d26158451 (diff) | |
download | zsh-44c7fd976b7d5b1d9f168bbf3ecdb09720a793e2.tar.gz zsh-44c7fd976b7d5b1d9f168bbf3ecdb09720a793e2.tar.bz2 zsh-44c7fd976b7d5b1d9f168bbf3ecdb09720a793e2.zip |
Merge pull request #1928 from dongweiming/add-hist-stamp
Add option for show in the command execution time stamp in the history
-rw-r--r-- | lib/aliases.zsh | 14 | ||||
-rw-r--r-- | templates/zshrc.zsh-template | 5 |
2 files changed, 17 insertions, 2 deletions
diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 9b3709172..b279bf855 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -13,8 +13,18 @@ alias please='sudo' #alias g='grep -in' # Show history -alias history='fc -l 1' - +if [ "$HIST_STAMPS" = "mm/dd/yyyy" ] +then + alias history='fc -fl 1' +elif [ "$HIST_STAMPS" = "dd.mm.yyyy" ] +then + alias history='fc -El 1' +elif [ "$HIST_STAMPS" = "yyyy-mm-dd" ] +then + alias history='fc -il 1' +else + alias history='fc -l 1' +fi # List direcory contents alias lsa='ls -lah' alias l='ls -la' diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index 1dfb6998c..c175c5811 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -37,6 +37,11 @@ ZSH_THEME="robbyrussell" # much faster. # DISABLE_UNTRACKED_FILES_DIRTY="true" +# Uncomment following line if you want to shown in the command execution time stamp +# in the history command output. The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"| +# yyyy-mm-dd +# HIST_STAMPS="mm/dd/yyyy" + # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) |