Skip to content

Instantly share code, notes, and snippets.

@rcls
Created December 29, 2021 06:48
Show Gist options
  • Save rcls/8a3b5ab4c94aa7a2996cc11c7e65e0c9 to your computer and use it in GitHub Desktop.
Save rcls/8a3b5ab4c94aa7a2996cc11c7e65e0c9 to your computer and use it in GitHub Desktop.
# .bashrc
# Source global definitions
#if [ -f /etc/bashrc ]; then
# . /etc/bashrc
#fi
# export SYSTEMD_PAGER=
# User specific aliases and functions
#export INPUTRC=
#export LC_COLLATE=C
umask 022
set -o physical
set -o notify
shopt -s cmdhist histreedit histverify histappend
shopt -s checkwinsize no_empty_cmd_completion
history -a
FIGNORE='.o:~'
HISTCONTROL=ignorespace:erasedups
HISTSIZE=10000
HISTFILESIZE=10000
CDPATH=:~
if test -z "$SSH_CONNECTION"
then
if test "$TERM" = xterm || test "$TERM" = xterm-256color
then
PROMPT_COMMAND='echo -ne "\033]0;${PWD#$HOME/}\007"'
fi
# '\w| ' in bold
PS1='\[\e[1m\]\w| \[\e[m\]'
else
if test "$TERM" = xterm || test "$TERM" = xterm-256color
then
PROMPT_COMMAND='echo -ne "\033]0;$HOSTNAME:${PWD#$HOME/}\007"'
fi
# '\h:w| ' in bold.
PS1='\[\e[1m\]\h:\w| \[\e[m\]'
fi
PATH=/home/r.loader/.cargo/bin:/usr/bin:/usr/sbin:/bin:/sbin
cd() {
if test "$#" -gt 1
then
(
D="$1"
shift
builtin cd "$D" && "$@"
)
else
builtin cd "$@"
fi
}
function diff() { /usr/bin/diff -u "$@" ; }
function cp() { /bin/cp --reflink=auto "$@" ; }
function df() { /bin/df -x tmpfs -B 1m "$@" ; }
#function gk() { gitk --all --date-order "$@" ; }
function qg() { qgit --all --date-order "$@" ; }
function l() { ls -alNG --quoting-style=literal --color=auto "$@" ; }
function m() { make -j8 "$@" ; }
function subm() { git submodule foreach git "$@" ; }
function subgrep() { git submodule foreach "git grep $* || true" ; }
alias ip='ip -c'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment