Sort some aliases
This commit is contained in:
		
							parent
							
								
									51357f7e47
								
							
						
					
					
						commit
						ed286f1d0a
					
				
					 3 changed files with 17 additions and 18 deletions
				
			
		
							
								
								
									
										20
									
								
								zshrc
									
										
									
									
									
								
							
							
						
						
									
										20
									
								
								zshrc
									
										
									
									
									
								
							|  | @ -35,6 +35,19 @@ try-source() { | |||
| 	fi | ||||
|     done | ||||
| } | ||||
| 
 | ||||
| # run hash -r after the given command. Useful for package manager commands that | ||||
| # change installed packages | ||||
| hashafter () { | ||||
| 	local fname=$1 | ||||
| 	eval " | ||||
| 	function $fname() { | ||||
| 		command $fname \"\$@\" | ||||
| 		hash -r | ||||
| 	} | ||||
| 	" | ||||
| } | ||||
| 
 | ||||
| exists() { command -v "$@" >/dev/null } | ||||
| 
 | ||||
| function(){ | ||||
|  | @ -66,12 +79,5 @@ if exists stack; then | |||
| 	eval "$(stack --bash-completion-script stack)" | ||||
| fi | ||||
| 
 | ||||
| if exists pyenv; then | ||||
|     eval "$(pyenv init -)" | ||||
|     if pyenv commands | grep -q 'virtualenv'; then | ||||
| 	eval "$(pyenv virtualenv-init -)" | ||||
|     fi | ||||
| fi | ||||
| 
 | ||||
| exists todo && todo | ||||
| exists thefuck && eval $(thefuck --alias) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 crater2150
						crater2150