From 77cf8696053d5256b4deb7cddc79c31d26158451 Mon Sep 17 00:00:00 2001 From: dongweiming Date: Sun, 30 Jun 2013 20:46:10 +0800 Subject: Add option for show in the command execution time stamp in the history --- lib/aliases.zsh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'lib') 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' -- cgit v1.2.3-70-g09d2