Configures aliases for installed dependencies
This commit is contained in:
		
							parent
							
								
									9c41fabf57
								
							
						
					
					
						commit
						b91fdbd28f
					
				
					 1 changed files with 9 additions and 36 deletions
				
			
		
							
								
								
									
										45
									
								
								aliases.sh
									
										
									
									
									
								
							
							
						
						
									
										45
									
								
								aliases.sh
									
										
									
									
									
								
							| 
						 | 
					@ -1,49 +1,22 @@
 | 
				
			||||||
alias ll="ls -l"
 | 
					alias ll="ls -l"
 | 
				
			||||||
 | 
					 | 
				
			||||||
alias catn="cat -n"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
alias egrep="egrep --color"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
alias grep="egrep"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
alias c="clear"
 | 
					alias c="clear"
 | 
				
			||||||
 | 
					 | 
				
			||||||
alias vim="nvim"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
alias find="find -E"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
alias dir='find . -maxdepth 1 -type d -regex "\.\/[^.].+"'
 | 
					alias dir='find . -maxdepth 1 -type d -regex "\.\/[^.].+"'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# if pygmentize isn't installed run...
 | 
					 | 
				
			||||||
# sudo pip install pygments
 | 
					 | 
				
			||||||
# colorizes syntax of files
 | 
					 | 
				
			||||||
alias ccat="pygmentize -g"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
# self-evident git alias
 | 
					# aliases with dependencies
 | 
				
			||||||
alias gprom="git pull --rebase origin master"
 | 
					command -v nvim && alias vim="nvim" || echo "Missing dependency (nvim). Failed to alias vim -> nvim"
 | 
				
			||||||
 | 
					command -v 'find -E' && alias find="find -E" || echo "Missing dependency (find -E). Failed to alias find -> find -E"
 | 
				
			||||||
alias 'glp'="git log --graph --pretty=format:'%Cred%h%Creset -%Cblue %an %Creset - %C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative"
 | 
					command -v egrep && alias grep="egrep" || echo "Missing dependency (egrep). Failed to alias grep -> egrep"
 | 
				
			||||||
 | 
					command -v 'pygmentize -g' && alias ccat='pygmentize -g' || echo "Missing dependency (pygmentize -g). Failed to alias ccat -> pygmentize -g"
 | 
				
			||||||
# view the Unix directory stack as maintained through
 | 
					command -v hub && alias git=hub || echo "Missing dependency (hub). Failed to alias git -> hub"
 | 
				
			||||||
#     pushd and popd commands
 | 
					 | 
				
			||||||
alias wdirs='dirs | tr " " "\n" | sort -r'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# GitHub integration
 | 
					 | 
				
			||||||
alias git=hub
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Git aliases
 | 
					# git-specific aliases
 | 
				
			||||||
# List MRU branches
 | 
					 | 
				
			||||||
git config --global alias.recent 'for-each-ref --count=10 --sort=-committerdate refs/heads/ --format="%(refname:short)"'
 | 
					git config --global alias.recent 'for-each-ref --count=10 --sort=-committerdate refs/heads/ --format="%(refname:short)"'
 | 
				
			||||||
 | 
					 | 
				
			||||||
# List today's work
 | 
					 | 
				
			||||||
git config --global alias.today 'log --since=00:00:00 --all --no-merges --oneline --author="$(git config --get user.email)"'
 | 
					git config --global alias.today 'log --since=00:00:00 --all --no-merges --oneline --author="$(git config --get user.email)"'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# git commit --amend --no-edit
 | 
					alias glp="git log --graph --pretty=format:'%Cred%h%Creset -%Cblue %an %Creset - %C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative"
 | 
				
			||||||
 | 
					alias gprom="git pull --rebase origin master"
 | 
				
			||||||
alias gcan='git commit --amend --no-edit'
 | 
					alias gcan='git commit --amend --no-edit'
 | 
				
			||||||
 | 
					 | 
				
			||||||
# git commit --amend --no-edit
 | 
					 | 
				
			||||||
alias gpf='git push --force'
 | 
					alias gpf='git push --force'
 | 
				
			||||||
 | 
					 | 
				
			||||||
# git commit --amend --no-edit
 | 
					 | 
				
			||||||
alias gds='git diff --staged'
 | 
					alias gds='git diff --staged'
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue