Added sshgit function
This commit is contained in:
		
							parent
							
								
									615ee05309
								
							
						
					
					
						commit
						8fee0aaf97
					
				
					 1 changed files with 10 additions and 15 deletions
				
			
		
							
								
								
									
										25
									
								
								config/zshrc
									
										
									
									
									
								
							
							
						
						
									
										25
									
								
								config/zshrc
									
										
									
									
									
								
							|  | @ -99,25 +99,20 @@ alias helios='ssh tdpeuter@helios.ugent.be' | |||
| alias resblue='systemctl restart bluetooth' | ||||
| alias Personal='cd ~/Documents/synchronisatie/Personal/_PERSOONLIJK/' | ||||
| alias UGent='cd ~/Documents/synchronisatie/UGent/Informatica\ J1\ 2021-2022/' | ||||
| alias vol='~/.scripts/vol.sh' | ||||
| 
 | ||||
| vol () { | ||||
| sshgit () { | ||||
| 
 | ||||
|     if [[ $# == 0 ]] ; then | ||||
|         echo "Volume: $(pamixer --get-volume-human)" | ||||
|     elif [[ "$1" =~ ^[0-9]*$ ]] ; then | ||||
|         pamixer --set-volume "${1}"  | ||||
|         vol | ||||
|     elif [[ "$1" =~ ^[+] ]] ; then | ||||
|         pamixer -i "${1#\+}" | ||||
|         vol | ||||
|     elif [[ "$1" =~ ^- ]] ; then | ||||
|         pamixer -d "${1#-}" | ||||
|         vol | ||||
|     elif [[ "$1" =~ m ]] ; then | ||||
|         pamixer --toggle | ||||
|         vol | ||||
|     # Check arguments | ||||
|     if [[ $# -lt 2 ]] ; then  | ||||
|         echo "Requires at least two arguments" | ||||
|         exit 1 | ||||
|     fi | ||||
| 
 | ||||
|     ssh_key="$1" | ||||
|     shift | ||||
|     GIT_SSH_COMMAND="ssh -i ${ssh_key}" git $@ | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| cpdir () { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue