bash: archive .bashrc; vim: simplify and archive old vim configs
This commit is contained in:
parent
5e30fd7146
commit
4f811f48dc
6 changed files with 2414 additions and 17 deletions
42
_archive/dot_bashrc
Normal file
42
_archive/dot_bashrc
Normal file
|
@ -0,0 +1,42 @@
|
|||
# shellcheck shell=bash disable=SC1090,SC2164
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
HISTSIZE=1000
|
||||
HISTFILE="$HOME/.bash_history.$UID"
|
||||
HISTCONTROL=ignoredups
|
||||
shopt -s histappend checkwinsize autocd
|
||||
|
||||
export LESS='i M R'
|
||||
export PAGER=less
|
||||
export EDITOR=vim
|
||||
export TIME_STYLE=long-iso
|
||||
|
||||
PS1='\[\e[0m\][ \u@\h \[\e[34m\]\w\[\e[0m\] ]\n\$ '
|
||||
|
||||
unalias -a
|
||||
|
||||
diff() { command diff --color "$@"; }
|
||||
tailf() { command less +F "$@"; }
|
||||
rgrep() { command grep --exclude-dir=\.git -R "$@"; }
|
||||
whence() { command -v "$@"; }
|
||||
|
||||
ls() { command ls --color=auto "$@"; }
|
||||
ll() { ls -alh "$@"; }
|
||||
ld() { ls -dlh "$@"; }
|
||||
|
||||
# git
|
||||
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)"; }
|
||||
ggrep() { command git grep "$@"; }
|
||||
gsi() { command tig status; }
|
||||
|
||||
# tmux
|
||||
tmux() { command tmux -2 "$@"; }
|
||||
atmux() { tmux attach; }
|
||||
|
||||
# we want to see exit code on error (it also has to be the last entry here)
|
||||
trap_msg='\e[31m>>\e[0m exit \e[31m%s\e[0m\n'
|
||||
trap 'printf "$trap_msg" "$?" >&2' ERR
|
Loading…
Add table
Add a link
Reference in a new issue