mirror of
				https://github.com/ohmyzsh/ohmyzsh.git
				synced 2024-05-11 05:55:17 +00:00 
			
		
		
		
	avit: fix handling of time since last commit (#7350)
This commit is contained in:
		
				
					committed by
					
						
						Marc Cornellà
					
				
			
			
				
	
			
			
			
						parent
						
							f31ef2024d
						
					
				
				
					commit
					f96d18ca93
				
			@@ -63,7 +63,7 @@ function _git_time_since_commit() {
 | 
				
			|||||||
    sub_hours=$((hours % 24))
 | 
					    sub_hours=$((hours % 24))
 | 
				
			||||||
    sub_minutes=$((minutes % 60))
 | 
					    sub_minutes=$((minutes % 60))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if [ $hours -gt 24 ]; then
 | 
					    if [ $hours -ge 24 ]; then
 | 
				
			||||||
      commit_age="${days}d"
 | 
					      commit_age="${days}d"
 | 
				
			||||||
    elif [ $minutes -gt 60 ]; then
 | 
					    elif [ $minutes -gt 60 ]; then
 | 
				
			||||||
      commit_age="${sub_hours}h${sub_minutes}m"
 | 
					      commit_age="${sub_hours}h${sub_minutes}m"
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user