Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
d3e3b2dd
Commit
d3e3b2dd
authored
Jul 13, 2018
by
Cristian Consonni
Committed by
Marc Cornellà
Jul 13, 2018
Browse files
Add support for custom timestamp format in history (#6770)
parent
f88396e3
Changes
2
Show whitespace changes
Inline
Side-by-side
lib/history.zsh
View file @
d3e3b2dd
...
@@ -23,7 +23,8 @@ case $HIST_STAMPS in
...
@@ -23,7 +23,8 @@ case $HIST_STAMPS in
"mm/dd/yyyy"
)
alias history
=
'omz_history -f'
;;
"mm/dd/yyyy"
)
alias history
=
'omz_history -f'
;;
"dd.mm.yyyy"
)
alias history
=
'omz_history -E'
;;
"dd.mm.yyyy"
)
alias history
=
'omz_history -E'
;;
"yyyy-mm-dd"
)
alias history
=
'omz_history -i'
;;
"yyyy-mm-dd"
)
alias history
=
'omz_history -i'
;;
*
)
alias history
=
'omz_history'
;;
""
)
alias history
=
'omz_history'
;;
*
)
alias history
=
"omz_history -t '
$HIST_STAMPS
'"
;;
esac
esac
## History file configuration
## History file configuration
...
...
templates/zshrc.zsh-template
View file @
d3e3b2dd
...
@@ -48,7 +48,10 @@ ZSH_THEME="robbyrussell"
...
@@ -48,7 +48,10 @@ ZSH_THEME="robbyrussell"
# Uncomment the following line if you want to change the command execution time
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
# HIST_STAMPS="mm/dd/yyyy"
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# Would you like to use another custom folder than $ZSH/custom?
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment