Add git aliases
This commit is contained in:
		
							parent
							
								
									ab6ace45ba
								
							
						
					
					
						commit
						912dfa56d4
					
				| 
						 | 
				
			
			@ -6,7 +6,7 @@ function current_dir() {
 | 
			
		|||
    else
 | 
			
		||||
        current_dir=${current_dir##*/}
 | 
			
		||||
    fi
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    echo $current_dir
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -33,6 +33,21 @@ if [[ -n $ZELLIJ ]]; then
 | 
			
		|||
    add-zsh-hook preexec set_tab_to_command_line
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# git aliases
 | 
			
		||||
 | 
			
		||||
function git_aliases() {
 | 
			
		||||
    echo "git aliases:"
 | 
			
		||||
    echo "\tgs:    status -sb"
 | 
			
		||||
    echo "\tgl:    log --oneline"
 | 
			
		||||
    echo "\tglast: log -1 HEAD --stat"
 | 
			
		||||
    echo "\tgds:   diff --staged"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
alias gs="git status -sb"
 | 
			
		||||
alias gl="git log --oneline"
 | 
			
		||||
alias glast="git log -1 HEAD --stat"
 | 
			
		||||
alias gds="git diff --staged"
 | 
			
		||||
 | 
			
		||||
# load Cargo
 | 
			
		||||
if [ -f "$HOME/.cargo/env" ]; then
 | 
			
		||||
	. "$HOME/.cargo/env"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue