[zsh] Fix up init functions
- Use autoload +X in do_init_functions - Properly redirect stdout and stderr in do_init_functions and init_env_vi so they don't print anything
This commit is contained in:
		
							parent
							
								
									4b2cef086f
								
							
						
					
					
						commit
						11ce2cd5c7
					
				
					 2 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -2,7 +2,7 @@
 | 
			
		|||
# Eryn Wells <eryn@erynwells.me>
 | 
			
		||||
 | 
			
		||||
for func in ${(P)${1}}; do
 | 
			
		||||
    if autoload -Uz $func >& -; then
 | 
			
		||||
    if autoload +X -Uz $func &> /dev/null; then
 | 
			
		||||
        $func
 | 
			
		||||
    fi
 | 
			
		||||
done
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3,10 +3,10 @@
 | 
			
		|||
 | 
			
		||||
# Prefer nvim and vim, in that order, over standard vi, which is insufferable.
 | 
			
		||||
 | 
			
		||||
if whence -cp nvim >& -; then
 | 
			
		||||
if whence -cp nvim &> /dev/null; then
 | 
			
		||||
    alias vi=nvim
 | 
			
		||||
    export EDITOR=nvim
 | 
			
		||||
elif whence -cp vim >& -; then
 | 
			
		||||
elif whence -cp vim &> /dev/null; then
 | 
			
		||||
    alias vi=vim
 | 
			
		||||
    export EDITOR=vim
 | 
			
		||||
fi
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue