Update xbps-aliases, call hash -r after (un)install actions
				
					
				
			This commit is contained in:
		
							parent
							
								
									6292d72015
								
							
						
					
					
						commit
						4952a2cd74
					
				
					 1 changed files with 18 additions and 4 deletions
				
			
		
							
								
								
									
										22
									
								
								aliases/void
									
										
									
									
									
								
							
							
						
						
									
										22
									
								
								aliases/void
									
										
									
									
									
								
							|  | @ -1,5 +1,19 @@ | |||
| #!/bin/zsh | ||||
| 
 | ||||
| hashafter () { | ||||
| 	local fname=$1 | ||||
| 	eval " | ||||
| 	function $fname() { | ||||
| 		command $fname \"\$@\" | ||||
| 		hash -r | ||||
| 	} | ||||
| 	" | ||||
| } | ||||
| 
 | ||||
| hashafter xi | ||||
| hashafter xbps-install | ||||
| hashafter xbps-remove | ||||
| 
 | ||||
| grep -q "void" /etc/os-release || return | ||||
| 
 | ||||
| alias xq="xbps-query -Rs" | ||||
|  | @ -16,19 +30,19 @@ xqn() { | |||
| 
 | ||||
| alias xfiles="xbps-query -f" | ||||
| 
 | ||||
| function xupdate() { | ||||
| xupdate() { | ||||
| 	sudo xbps-install -Su | ||||
| 	if [[ $? == 16 ]]; then | ||||
| 		xbps-install -Syu xbps | ||||
| 		sudo xbps-install -Syu xbps | ||||
| 		xupdate | ||||
| 	fi | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| function xowner() { | ||||
| xowner() { | ||||
| 	xbps-query -Ro "*${1}*" | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| sv() { | ||||
| 	command sv "$@" | ||||
| 	if [[ "$1" == "up" ]]; then | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 crater2150
						crater2150