From ad0f5dac05092e25efce5a2b4174e4d4ab414b1b Mon Sep 17 00:00:00 2001 From: Marcel Schwarz Date: Sat, 1 Aug 2020 22:58:12 +0200 Subject: [PATCH] Add some more configs to the bashrc --- modules/bashrc/bashrc_default | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/modules/bashrc/bashrc_default b/modules/bashrc/bashrc_default index 05bd9bb..5b38d4c 100755 --- a/modules/bashrc/bashrc_default +++ b/modules/bashrc/bashrc_default @@ -102,6 +102,23 @@ xhost +local:root > /dev/null 2>&1 complete -cf sudo +# if the command-not-found package is installed, use it +if [ -x /usr/lib/command-not-found -o -x /usr/share/command-not-found/command-not-found ]; then + function command_not_found_handle { + # check because c-n-f could've been removed in the meantime + if [ -x /usr/lib/command-not-found ]; then + /usr/lib/command-not-found -- "$1" + return $? + elif [ -x /usr/share/command-not-found/command-not-found ]; then + /usr/share/command-not-found/command-not-found -- "$1" + return $? + else + printf "%s: command not found\n" "$1" >&2 + return 127 + fi + } +fi + # Bash won't get SIGWINCH if another process is in the foreground. # Enable checkwinsize so that bash will check the terminal size when # it regains control. #65623 @@ -143,8 +160,16 @@ ex () # better yaourt colors export YAOURT_COLORS="nb=1:pkg=1:ver=1;32:lver=1;45:installed=1;42:grp=1;34:od=1;41;5:votes=1;44:dsc=0:other=1;35" -alias ll='ls -l' +# Colorize ls command +LS_COLORS='di=36;40:ln=1;36;40:so=0;40:pi=0;40:ex=1;32;40:bd=0;40:cd=0;40:su=0;40:sg=0;40:tw=1;36;40:ow=1;36;40:' +export LS_COLORS +export LS_OPTIONS='--color=auto' +eval "`dircolors`" +alias ls='ls $LS_OPTIONS' +alias ll='ls $LS_OPTIONS -l' alias la='ls -la' +alias l='ls $LS_OPTIONS -lA' + alias vi='vim' alias tmux="TERM=screen-256color tmux" alias ctc='tmux show-buffer | xclip -selection clipboard'