minor adjustment to readme
[dotfiles/.git] / .bashrc
1 # ~/.bashrc: executed by bash(1) for non-login shells.
2 # If not running interactively, don't do anything
3 case $- in
4     *i*) ;;
5       *) return;;
6 esac
7 #Import all of the subfiles for .bashrc
8
9 if [ -f ~/.config/bashrc/alias ];
10 then
11     . ~/.config/bashrc/alias
12 fi
13
14 if [ -f ~/.config/bashrc/promts ];
15 then
16     . ~/.config/bashrc/promts
17 fi
18
19 if [ -f ~/.config/bashrc/titles ];
20 then
21     . ~/.config/bashrc/titles
22 fi
23
24 if [ -f ~/.config/bashrc/exports ];
25 then
26     . ~/.config/bashrc/exports
27 fi
28
29 if [ -f ~/.config/bashrc/functions ];
30 then
31     . ~/.config/bashrc/functions
32 fi
33
34
35
36 #########################################AUTOCOMPLETION#####################
37 # sources /etc/bash.bashrc).
38 if ! shopt -oq posix; then
39   if [ -f /usr/share/bash-completion/bash_completion ]; then
40     . /usr/share/bash-completion/bash_completion
41   elif [ -f /etc/bash_completion ]; then
42     . /etc/bash_completion
43   fi
44 fi
45
46 if [ -f /usr/share/fzf/completion.bash ];
47 then
48 source /usr/share/fzf/completion.bash
49 fi
50
51 if [ -f /usr/share/fzf/completion.bash ];
52 then
53 source /usr/share/fzf/key-bindings.bash
54 fi
55 # autocomplete for sudo man and wich
56 complete -cf sudo man wich;
57 #For arch
58 bind 'set show-all-if-ambiguous on';
59 bind 'TAB:menu-complete';
60 ###########################################################################
61
62 ####################################HISTORY MANAGEMENT#####################
63 # don't put duplicate lines or lines starting with space in the history.
64 HISTCONTROL=ignoreboth
65 # append to the history file, don't overwrite it
66 shopt -s histappend
67 # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
68 HISTSIZE=
69 HISTFILESIZE=
70 export HISTIGNORE='&:ls:ll:la:cd:exit:clear:history'
71 ###########################################################################
72
73
74
75 # check the window size after each command and, if necessary,
76 # update the values of LINES and COLUMNS.
77 shopt -s checkwinsize
78
79 # make less more friendly for non-text input files, see lesspipe(1)
80 [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
81 # vi mode in the shell
82 set -o vi
83