Commit 00331b786c0b607fe83f86475c9b26a8533c2efa

Authored by mj
1 parent ae7f735b3c
Exists in master and in 2 other branches 02-merge, dev

FIX .bashrc

Showing 1 changed file with 1 additions and 1 deletions Inline Diff

1 #@IgnoreInspection AddShebang 1 #@IgnoreInspection AddShebang
2 2
3 export ZCFG=$HOME/.config/zsh-config 3 export ZCFG=$HOME/.config/zsh-config
4 4
5 # If not running interactively, don't do anything 5 # If not running interactively, don't do anything
6 case $- in 6 case $- in
7 *i*) ;; 7 *i*) ;;
8 *) return;; 8 *) return;;
9 esac 9 esac
10 10
11 ######################## 11 ########################
12 # ******************** # 12 # ******************** #
13 # * * # 13 # * * #
14 # * COMPLETION * # 14 # * COMPLETION * #
15 # * * # 15 # * * #
16 # ******************** # 16 # ******************** #
17 ######################## 17 ########################
18 18
19 # enable bash completion in interactive shells 19 # enable bash completion in interactive shells
20 if [ -f /etc/bash_completion ]; then 20 if [ -f /etc/bash_completion ]; then
21 . /etc/bash_completion 21 . /etc/bash_completion
22 fi 22 fi
23 23
24 # if the command-not-found package is installed, use it 24 # if the command-not-found package is installed, use it
25 if [ -x /usr/lib/command-not-found ]; then 25 if [ -x /usr/lib/command-not-found ]; then
26 function command_not_found_handle { 26 function command_not_found_handle {
27 # check because c-n-f could've been removed in the meantime 27 # check because c-n-f could've been removed in the meantime
28 if [ -x /usr/lib/command-not-found ]; then 28 if [ -x /usr/lib/command-not-found ]; then
29 /usr/bin/python /usr/lib/command-not-found -- $1 29 /usr/bin/python /usr/lib/command-not-found -- $1
30 return $? 30 return $?
31 else 31 else
32 return 127 32 return 127
33 fi 33 fi
34 } 34 }
35 fi 35 fi
36 36
37 ######################## 37 ########################
38 # ******************** # 38 # ******************** #
39 # * * # 39 # * * #
40 # * HISTORY * # 40 # * HISTORY * #
41 # * * # 41 # * * #
42 # ******************** # 42 # ******************** #
43 ######################## 43 ########################
44 44
45 # Eternal bash history. 45 # Eternal bash history.
46 # --------------------- 46 # ---------------------
47 export HISTFILESIZE= 47 export HISTFILESIZE=
48 export HISTSIZE= 48 export HISTSIZE=
49 export HISTTIMEFORMAT="[%F %T] " 49 export HISTTIMEFORMAT="[%F %T] "
50 # Change the file location 50 # Change the file location
51 export HISTFILE=~/.config/new_bash_history 51 export HISTFILE=~/.config/new_bash_history
52 # Force prompt to write history after every command 52 # Force prompt to write history after every command
53 PROMPT_COMMAND="history -a; $PROMPT_COMMAND" 53 PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
54 54
55 55
56 # check the window size after each command 56 # check the window size after each command
57 shopt -s checkwinsize 57 shopt -s checkwinsize
58 58
59 # If set, the pattern "**" used in a pathname expansion context will 59 # If set, the pattern "**" used in a pathname expansion context will
60 # match all files and zero or more directories and subdirectories. 60 # match all files and zero or more directories and subdirectories.
61 #shopt -s globstar 61 #shopt -s globstar
62 62
63 # set variable identifying the chroot you work in (used in the prompt below) 63 # set variable identifying the chroot you work in (used in the prompt below)
64 if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then 64 if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
65 debian_chroot=$(cat /etc/debian_chroot) 65 debian_chroot=$(cat /etc/debian_chroot)
66 fi 66 fi
67 67
68 # set a fancy prompt 68 # set a fancy prompt
69 case "$TERM" in 69 case "$TERM" in
70 xterm-color) color_prompt=yes;; 70 xterm-color) color_prompt=yes;;
71 esac 71 esac
72 72
73 # colored prompt 73 # colored prompt
74 force_color_prompt=yes 74 force_color_prompt=yes
75 75
76 if [ -n "$force_color_prompt" ]; then 76 if [ -n "$force_color_prompt" ]; then
77 if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then 77 if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
78 # We have color support; assume it's compliant with Ecma-48 78 # We have color support; assume it's compliant with Ecma-48
79 # (ISO/IEC-6429). (Lack of such support is extremely rare, and such 79 # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
80 # a case would tend to support setf rather than setaf.) 80 # a case would tend to support setf rather than setaf.)
81 color_prompt=yes 81 color_prompt=yes
82 else 82 else
83 color_prompt= 83 color_prompt=
84 fi 84 fi
85 fi 85 fi
86 86
87 if [ "$color_prompt" = yes ]; then 87 if [ "$color_prompt" = yes ]; then
88 PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' 88 PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
89 else 89 else
90 PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' 90 PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
91 fi 91 fi
92 #unset color_prompt force_color_prompt 92 #unset color_prompt force_color_prompt
93 93
94 # enable color support of ls and also add handy aliases 94 # enable color support of ls and also add handy aliases
95 if [ -x /usr/bin/dircolors ]; then 95 if [ -x /usr/bin/dircolors ]; then
96 test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" 96 test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
97 alias ls='ls --color=auto' 97 alias ls='ls --color=auto'
98 alias dir='dir --color=auto' 98 alias dir='dir --color=auto'
99 alias vdir='vdir --color=auto' 99 alias vdir='vdir --color=auto'
100 100
101 alias grep='grep --color=auto' 101 alias grep='grep --color=auto'
102 alias fgrep='fgrep --color=auto' 102 alias fgrep='fgrep --color=auto'
103 alias egrep='egrep --color=auto' 103 alias egrep='egrep --color=auto'
104 fi 104 fi
105 105
106 # Environment 106 # Environment
107 if [ -f $ZCFG/dotfiles/environment.sh ]; then 107 if [ -f $ZCFG/dotfiles/environment.sh ]; then
108 . $ZCFG/dotfiles/environment.sh 108 . $ZCFG/dotfiles/environment.sh
109 fi 109 fi
110 110
111 111
112 # Alias definitions 112 # Alias definitions
113 if [ -f $ZCFG/templates/bash_aliases ]; then 113 if [ -f $ZCFG/templates/bash_aliases ]; then
114 . $ZCFG/templates/bash_aliases 114 . $ZCFG/templates/bash_aliases.sh
115 fi 115 fi
116 116