systemSetup

system setup, configuration and dotfiles
git clone https://noulin.net/git/systemSetup.git
Log | Files | Refs | README | LICENSE

commit 653cf4209914beb3a053ec1ff1059c3bc7ec396b
parent 5c7407ac4ebdf434e917b21972a4c8740200e06c
Author: Remy Noulin <loader2x@gmail.com>
Date:   Sun, 10 May 2020 21:37:21 +0200

add bash configuration for rhel 8 / centos 8

rhel_centos/.bash_aliases | 135 ++++++++++++++++++++++++++++++++++++++++++++++
rhel_centos/.bashrc       | 122 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 257 insertions(+)

Diffstat:
Arhel_centos/.bash_aliases | 135+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Arhel_centos/.bashrc | 122+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 257 insertions(+), 0 deletions(-)

diff --git a/rhel_centos/.bash_aliases b/rhel_centos/.bash_aliases @@ -0,0 +1,135 @@ +if [ -f ~/.bash_aliases_local ]; then + . ~/.bash_aliases_local +fi + +alias al="(cat ~/.bash_aliases|grep '^alias' && cat ~/.bash_aliases_local | grep '^alias')" +alias whal='al|grep' +alias pss='pwgen -s -y 20 6; echo ; pwgen -s 20 6' +alias tar="tar --use-compress-program=pbzip2" +alias l="ls -l -h --time-style=long-iso" +alias la="ls -ltr --time-style=long-iso" +alias ll="ls -al --time-style=long-iso" +alias rd="rm -rf" +alias cd..='cd ..' +alias ..='cd ..' +alias ...='cd ../..' +alias suspend='sudo pm-suspend' +alias objdump='objdump -M intel' +alias g='git' +alias csv='scim --txtdelim=";"' +alias cs='column -s , -t' +alias new='~/bin/new.sh' +alias mk='source ~/bin/mk.sh' +alias r='ranger' +alias h='history' +alias vd='vimdiff' +alias noc="sed 's/\x1b\[[0-9;]*[a-zA-Z]//g'" +alias td='tree -d' +alias d='gdb -tui' +alias da='gdb -tui --args' +alias vb='vim `find .|pick`' +alias vn='vim `git ls-files|pick`' +alias c='source ~/bin/c.sh' +alias pl='~/bin/pl.sh' + + +# Display colors in less : +alias less="less -R" +alias le=less + + +# apt +alias qs="apt-cache search" +alias qd="apt-cache show" +alias qw="apt-get install" + +alias duu="du -h --max-depth=1" +alias dfh="df -h" + +# Screen attach detach +alias scr="screen -T xterm" +alias sr="screen -r" +alias sd="screen -d" +alias ta="tmux attach" +alias tad="tmux attach -d" + +#alias webs="w3m -no-cookie -s -W www.google.com" +alias webs='/usr/local/bin/webs.sh' +alias ws=webs +alias cm="cmatrix -b -u 6 -a -C blue" + +alias ifconfig='/sbin/ifconfig' +alias xus="xmodmap /usr/share/xmodmap/xmodmap.us" +alias xse="xmodmap /usr/share/xmodmap/xmodmap.se" + +# easydoneit +alias ,='edi' +alias ,l=', ls' +alias ,c=', cat' +alias s='~/bin/xapianOmegaSearch.sh' +alias ,lc=',l -s|tac' +alias ,lt=',l -t|tac' +alias ,a=', add -t' +alias ,s=', search' +# Add task at bottom of list +alias ,bt=', topbot bottom;, cr' +# Add task on top of list +alias ,tt=', topbot top;, cr' + +# sheepy +alias z='sheepy' +alias ref='~/bin/ref.sh' +alias ug='~/bin/ug.sh' +alias zh='z -h' +alias zc='z -c' +alias zl='z -l' +alias zd='z -d' +alias zn='z -n' +alias zm='z -m' +alias ze='z -e' +alias sh='spm help' +alias sn='spm new' +alias sp='spm publish' +alias si='spm install' +alias sun='spm uninstall' +alias ssw='spm show' +alias sup='spm update' +alias sf='spm find' +alias st='spm top' +alias sht='spm hot' +alias slt='spm latest' +alias sw='spm whoami' +alias spf='spm profile' +alias sif='spm info' +alias sT='spmTui' + +# git +alias go='git checkout' +alias gi='git commit' +alias gia='git commit --amend' +alias ga='git commit -a' +alias gd='git diff' +alias gp='git push' +alias gl='git pull' +alias gu='git status' +alias gg='git log --pretty=fuller' +alias gh='git gg' +alias gc='git clone' +alias gb='git blame' +alias gs='git show --pretty=fuller' +alias gst='git stash' +alias gsta='git stash apply' +alias gr='git branch -D' +alias grt='git remote -v' +alias gj='git log -p' +alias gle='~/bin/gle.sh' +alias gdf='~/bin/gdf.sh' +alias gig='cp ~/.gittemplates/.gitignore' +alias gad='git add' +alias gcl='git clean -d -f' + +alias N='~/bin/N.sh' + +alias lsb="export LS_COLORS=\"no=00:fi=00:di=01;34:ln=01;35:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;31:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;35:*.au=00;35:*.flac=00;35:*.mid=00;35:*.midi=00;35:*.mka=00;35:*.mp3=00;35:*.mpc=00;35:*.ogg=00;35:*.ra=00;35:*.wav=00;35:\"" +alias lsd="export LS_COLORS=\"no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.svgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:\"" + diff --git a/rhel_centos/.bashrc b/rhel_centos/.bashrc @@ -0,0 +1,122 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# If not running interactively, don't do anything +[ -z "$PS1" ] && return + +# append to the history file, don't overwrite it +shopt -s histappend + +# don't put duplicate lines in the history. See bash(1) for more options +export HISTCONTROL=ignoredups + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +export HISTSIZE=100000 +export HISTFILESIZE=100000 +export HISTTIMEFORMAT="%y-%m-%d %T " + +# default editor +export EDITOR=vim + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# If set, the pattern "**" used in a pathname expansion context will +# match all files and zero or more directories and subdirectories. +#shopt -s globstar + +# make less more friendly for non-text input files, see lesspipe(1) +#[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set variable identifying the chroot you work in (used in the prompt below) +if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then + debian_chroot=$(cat /etc/debian_chroot) +fi + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in + xterm-color) color_prompt=yes;; +esac + +# uncomment for a colored prompt, if the terminal has the capability; turned +# off by default to not distract the user: the focus in a terminal window +# should be on the output of commands, not on the prompt +force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +if [ "$color_prompt" = yes ]; then + #PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' + #PS1="\[\e]0;\w\a\]\n\[\e[32m\]\u@\h\[\e[33m\]:\w\[\e[0m\]> " + PS1="\[\e]0;\w\a\]\n\[\e[32m\]\u@\h\[\e[33m\] \w\[\e[0m\] \D{%m-%d %H:%M}> " +else + PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' +fi +unset color_prompt force_color_prompt + +# If this is an xterm set the title to user@host:dir +case "$TERM" in +xterm*|rxvt*) + PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1" + ;; +*) + ;; +esac + +# enable color support of ls and also add handy aliases +if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + alias ls='ls --color=auto' + #alias dir='dir --color=auto' + #alias vdir='vdir --color=auto' + + alias grep='grep --color=always' + #alias fgrep='fgrep --color=auto' + #alias egrep='egrep --color=auto' + + export LESSOPEN="| /usr/share/source-highlight/src-hilite-lesspipe.sh %s" + export LESS=' -R ' +fi + +# some more ls aliases +#alias ll='ls -l' +#alias la='ls -A' +#alias l='ls -CF' + +# Alias definitions. +# You may want to put all your additions into a separate file like +# ~/.bash_aliases, instead of adding them here directly. +# See /usr/share/doc/bash-doc/examples in the bash-doc package. + +if [ -f ~/.bash_aliases ]; then + . ~/.bash_aliases +fi + +# enable programmable completion features (you don't need to enable +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile +# sources /etc/bash.bashrc). +if ! shopt -oq posix; then + if [ -f /usr/share/bash-completion/bash_completion ]; then + . /usr/share/bash-completion/bash_completion + elif [ -f /etc/bash_completion ]; then + . /etc/bash_completion + fi +fi + +# unset locale forwarded by ssh +unset LC_PAPER LC_ADDRESS LC_MONETARY LC_NUMERIC LC_TELEPHONE LC_IDENTIFICATION LC_MEASUREMENT LC_TIME LC_NAME + +PATH=~/bin/:$PATH + +[ -f ~/.fzf.bash ] && source ~/.fzf.bash