mirror of
				https://github.com/ohmyzsh/ohmyzsh.git
				synced 2025-11-04 13:21:19 +08:00 
			
		
		
		
	Add support for custom timestamp format in history (#6770)
This commit is contained in:
		
							parent
							
								
									f88396e327
								
							
						
					
					
						commit
						d3e3b2dd0d
					
				@ -23,7 +23,8 @@ case $HIST_STAMPS in
 | 
			
		||||
  "mm/dd/yyyy") alias history='omz_history -f' ;;
 | 
			
		||||
  "dd.mm.yyyy") alias history='omz_history -E' ;;
 | 
			
		||||
  "yyyy-mm-dd") alias history='omz_history -i' ;;
 | 
			
		||||
  *) alias history='omz_history' ;;
 | 
			
		||||
  "") alias history='omz_history' ;;
 | 
			
		||||
  *) alias history="omz_history -t '$HIST_STAMPS'" ;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
## History file configuration
 | 
			
		||||
 | 
			
		||||
@ -48,7 +48,10 @@ ZSH_THEME="robbyrussell"
 | 
			
		||||
 | 
			
		||||
# Uncomment the following line if you want to change the command execution time
 | 
			
		||||
# 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"
 | 
			
		||||
 | 
			
		||||
# Would you like to use another custom folder than $ZSH/custom?
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user