shells: some cleanup for bash and zsh
This commit is contained in:
		
							parent
							
								
									ebf583cb5a
								
							
						
					
					
						commit
						e898af0e0d
					
				
					 4 changed files with 8 additions and 43 deletions
				
			
		
							
								
								
									
										10
									
								
								dot_bashrc
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								dot_bashrc
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
# shellcheck shell=bash disable=SC1090
 | 
			
		||||
# shellcheck shell=bash disable=SC1090,SC2164
 | 
			
		||||
[[ $- != *i* ]] && return
 | 
			
		||||
 | 
			
		||||
HISTSIZE=1000
 | 
			
		||||
| 
						 | 
				
			
			@ -14,9 +14,6 @@ export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
 | 
			
		|||
 | 
			
		||||
PS1='\[\e[0m\][ \u@\h \[\e[34m\]\w\[\e[0m\] ]\n\$ '
 | 
			
		||||
 | 
			
		||||
beep()    { printf "\007"; }
 | 
			
		||||
fixterm() { printf "\u001bc"; }
 | 
			
		||||
 | 
			
		||||
diff()   { command diff --color "$@"; }
 | 
			
		||||
tailf()  { command less +F "$@"; }
 | 
			
		||||
rgrep()  { command grep --exclude-dir=\.git -R "$@"; }
 | 
			
		||||
| 
						 | 
				
			
			@ -34,7 +31,7 @@ gci()   { command git commit "$@"; }
 | 
			
		|||
gsl()   { command git stash list "$@"; }
 | 
			
		||||
gss()   { command git status -sbu "$@"; }
 | 
			
		||||
gup()   { command git pull "$@"; }
 | 
			
		||||
groot() { cd "$(command git rev-parse --show-cdup)" || return 1; }
 | 
			
		||||
groot() { cd "$(command git rev-parse --show-cdup)"; }
 | 
			
		||||
ggrep() { command git grep "$@"; }
 | 
			
		||||
gsi()   { command tig status; }
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -42,9 +39,6 @@ gsi()   { command tig status; }
 | 
			
		|||
tmux()  { command tmux -2 "$@"; }
 | 
			
		||||
atmux() { tmux attach; }
 | 
			
		||||
 | 
			
		||||
# sudo
 | 
			
		||||
sush()  { command sudo -Es; }
 | 
			
		||||
 | 
			
		||||
# bash-completion
 | 
			
		||||
completion_path='/usr/share/bash-completion/bash_completion'
 | 
			
		||||
[[ -r "$completion_path" ]] && source "$completion_path"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue