2025-03-04 14:00:46 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								# shellcheck shell=bash disable=SC1090,SC2164
							 | 
						
					
						
							
								
									
										
										
										
											2016-08-25 19:45:59 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								[[ $- != *i* ]] && return
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								HISTSIZE=1000
							 | 
						
					
						
							
								
									
										
										
										
											2018-07-10 03:25:36 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								HISTFILE="$HOME/.bash_history.$UID"
							 | 
						
					
						
							
								
									
										
										
										
											2016-10-20 15:44:56 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								HISTCONTROL=ignoredups
							 | 
						
					
						
							
								
									
										
										
										
											2018-07-11 13:26:42 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								shopt -s histappend checkwinsize autocd
							 | 
						
					
						
							
								
									
										
										
										
											2016-08-25 19:45:59 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-06 18:53:00 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								export LESS='i M R'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								export PAGER=less
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								export EDITOR=vim
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								export TIME_STYLE=long-iso
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-24 15:18:22 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket"
							 | 
						
					
						
							
								
									
										
										
										
											2022-08-22 02:57:33 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-10-03 15:31:55 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								PS1='\[\e[0m\][ \u@\h \[\e[34m\]\w\[\e[0m\] ]\n\$ '
							 | 
						
					
						
							
								
									
										
										
										
											2022-08-22 02:57:33 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2025-03-04 14:04:28 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								unalias -a
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2020-01-28 16:39:04 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								diff()   { command diff --color "$@"; }
							 | 
						
					
						
							
								
									
										
										
										
											2022-07-06 18:53:00 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								tailf()  { command less +F "$@"; }
							 | 
						
					
						
							
								
									
										
										
										
											2020-01-28 16:39:04 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								rgrep()  { command grep --exclude-dir=\.git -R "$@"; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								whence() { command -v "$@"; }
							 | 
						
					
						
							
								
									
										
										
										
											2018-07-10 03:25:36 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-25 18:15:26 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								ls() { command ls --color=auto "$@"; }
							 | 
						
					
						
							
								
									
										
										
										
											2022-08-22 02:57:33 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								ll() { ls -alh "$@"; }
							 | 
						
					
						
							
								
									
										
										
										
											2023-08-25 18:15:26 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								ld() { ls -dlh "$@"; }
							 | 
						
					
						
							
								
									
										
										
										
											2018-07-10 03:25:36 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# git
							 | 
						
					
						
							
								
									
										
										
										
											2020-01-28 16:39:04 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								gci()   { command git commit "$@"; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								gsl()   { command git stash list "$@"; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								gss()   { command git status -sbu "$@"; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								gup()   { command git pull "$@"; }
							 | 
						
					
						
							
								
									
										
										
										
											2025-03-04 14:00:46 +02:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								groot() { cd "$(command git rev-parse --show-cdup)"; }
							 | 
						
					
						
							
								
									
										
										
										
											2020-01-28 16:39:04 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								ggrep() { command git grep "$@"; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								gsi()   { command tig status; }
							 | 
						
					
						
							
								
									
										
										
										
											2018-07-10 03:25:36 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# tmux
							 | 
						
					
						
							
								
									
										
										
										
											2020-01-28 16:39:04 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								tmux()  { command tmux -2 "$@"; }
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								atmux() { tmux attach; }
							 | 
						
					
						
							
								
									
										
										
										
											2018-07-10 03:25:36 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# bash-completion
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								completion_path='/usr/share/bash-completion/bash_completion'
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								[[ -r "$completion_path" ]] && source "$completion_path"
							 | 
						
					
						
							
								
									
										
										
										
											2022-08-22 02:57:33 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2016-08-25 19:45:59 +03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# we want to see exit code on error (it also has to be the last entry here)
							 | 
						
					
						
							
								
									
										
										
										
											2019-11-22 19:32:06 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								trap_msg='\e[31m>>\e[0m exit \e[31m%s\e[0m\n'
							 | 
						
					
						
							
								
									
										
										
										
											2019-02-07 15:21:37 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								trap 'printf "$trap_msg" "$?" >&2' ERR
							 |