mirror of
				https://github.com/ohmyzsh/ohmyzsh.git
				synced 2024-05-11 05:55:17 +00:00 
			
		
		
		
	Add UPDATE_ZSH_DAYS setting
This commit is contained in:
		@@ -14,6 +14,12 @@ function _upgrade_zsh() {
 | 
			
		||||
  _update_zsh_update
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
epoch_target=$UPDATE_ZSH_DAYS
 | 
			
		||||
if [[ -z "$epoch_target" ]]; then
 | 
			
		||||
  # Default to old behavior
 | 
			
		||||
  epoch_target=13
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
if [ -f ~/.zsh-update ]
 | 
			
		||||
then
 | 
			
		||||
  . ~/.zsh-update
 | 
			
		||||
@@ -23,7 +29,7 @@ then
 | 
			
		||||
  fi
 | 
			
		||||
 | 
			
		||||
  epoch_diff=$(($(_current_epoch) - $LAST_EPOCH))
 | 
			
		||||
  if [ $epoch_diff -gt 13 ]
 | 
			
		||||
  if [ $epoch_diff -gt $epoch_target ]
 | 
			
		||||
  then
 | 
			
		||||
    if [ "$DISABLE_UPDATE_PROMPT" = "true" ]
 | 
			
		||||
    then
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user