From 87cb345f92f208d8271a8decee657e0d4874a866 Mon Sep 17 00:00:00 2001 From: Jannik ZANDER Date: Mon, 9 Jul 2018 22:18:42 +0200 Subject: [PATCH] Bash minor update --- .bashrc | 22 +--------------------- .profile | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/.bashrc b/.bashrc index f25a0ef..4218e8b 100644 --- a/.bashrc +++ b/.bashrc @@ -3,9 +3,6 @@ # If not running interactively, don't do anything [[ -z "$PS1" ]] && return -echo -echo $PS1 - cd ~ set -o vi @@ -17,13 +14,6 @@ shopt -s cdspell shopt -s autocd shopt -s globstar -# Set default programs -export SHELL='bash' -export EDITOR='vim' -export VISUAL='vim' -export PAGER='less' -export MANPAGER='less' - # Set prompt PS1='\[\033]0;${USER}@${HOSTNAME}:${PWD}\007\]' # terminal title @@ -42,6 +32,7 @@ PS1="$PS1"'\[\033[31m\]' # change color PS1="$PS1"'$(__git_ps1 "(%s)")' # bash function (no spaces) PS1="$PS1"'\[\033[00m\]' # change color PS1="$PS1"'\$ ' # prompt +export PS1 export GIT_PS1_SHOWDIRTYSTATE=1 export GIT_PS1_SHOWUNTRACKEDFILES=1 @@ -64,17 +55,6 @@ export HISTIGNORE="ll:ls:cd:cd -:pwd:exit:date:* --help"; export HISTFILESIZE= export HISTSIZE= -# colored GCC warnings and errors -export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' - -# Enable syntax-highlighting in less. -if [[ -f /mingw64/bin/src-hilite-lesspipe.sh ]]; then - export LESSOPEN="| /mingw64/bin/src-hilite-lesspipe.sh %s" -elif [[ -f /usr/share/source-highlight/src-hilite-lesspipe.sh ]]; then - export LESSOPEN="| /usr/share/source-highlight/src-hilite-lesspipe.sh %s" -fi -export LESS=" -R " - # Load completion, aliases, and local [ -f /etc/bash_completion ] && . /etc/bash_completion #[ -f ~/.bash_completion ] && . ~/.bash_completion; diff --git a/.profile b/.profile index 9d47161..cb95fcc 100644 --- a/.profile +++ b/.profile @@ -5,6 +5,12 @@ if [ -d "$HOME/bin" ] ; then PATH="$HOME/bin:$PATH" fi +# Set default programs +export SHELL='bash' +export EDITOR='vim' +export VISUAL='vim' +export PAGER='less' +export MANPAGER='less' # Prefer US language with SI units (Danish) export LANG="en_DK.UTF-8" @@ -20,3 +26,15 @@ fi #export XDG_DATA_HOME=$HOME/.local/share/ #export XDG_DATA_DIRS=/usr/local/share/:/usr/share/ +# Enable syntax-highlighting in less. +if [[ -f /mingw64/bin/src-hilite-lesspipe.sh ]]; then + export LESSOPEN="| /mingw64/bin/src-hilite-lesspipe.sh %s" +elif [[ -f /usr/share/source-highlight/src-hilite-lesspipe.sh ]]; then + export LESSOPEN="| /usr/share/source-highlight/src-hilite-lesspipe.sh %s" +fi +export LESS=" -R " + +# colored GCC warnings and errors +export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' + + -- 2.43.0