Add option for show in the command execution time stamp in the history
Diff
1diff --git a/lib/aliases.zsh b/lib/aliases.zsh
2index 9b3709172806220d7a012ae59292fc7e15dcd70b..b279bf85566ef4ce489d8c4f97b624ccf92dc41f 100644
3--- a/lib/aliases.zsh
4+++ b/lib/aliases.zsh
5@@ -13,8 +13,18 @@ alias please='sudo'
6 #alias g='grep -in'
7 8 # Show history
9-alias history='fc -l 1'
10-
11+if [ "$HIST_STAMPS" = "mm/dd/yyyy" ]
12+then
13+ alias history='fc -fl 1'
14+elif [ "$HIST_STAMPS" = "dd.mm.yyyy" ]
15+then
16+ alias history='fc -El 1'
17+elif [ "$HIST_STAMPS" = "yyyy-mm-dd" ]
18+then
19+ alias history='fc -il 1'
20+else
21+ alias history='fc -l 1'
22+fi
23 # List direcory contents
24 alias lsa='ls -lah'
25 alias l='ls -la'
26diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template
27index d4dded73a199689faae3d064ffc7f96c237975e3..3135df882663c226f2a9fb81673cd1b883520ba8 100644
28--- a/templates/zshrc.zsh-template
29+++ b/templates/zshrc.zsh-template
30@@ -37,6 +37,11 @@ ZSH_THEME="robbyrussell"
31 # much faster.
32 # DISABLE_UNTRACKED_FILES_DIRTY="true"
3334+# Uncomment following line if you want to shown in the command execution time stamp
35+# in the history command output. The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|
36+# yyyy-mm-dd
37+# HIST_STAMPS="mm/dd/yyyy"
38+
39 # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
40 # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
41 # Example format: plugins=(rails git textmate ruby lighthouse)