1 # ~/.bashrc: executed by bash(1) for non-login shells.
2 # If not running interactively, don't do anything
7 #Import all of the subfiles for .bashrc
9 if [ -f ~/.config/bashrc/alias ];
11 . ~/.config/bashrc/alias
14 if [ -f ~/.config/bashrc/promts ];
16 . ~/.config/bashrc/promts
19 if [ -f ~/.config/bashrc/titles ];
21 . ~/.config/bashrc/titles
24 if [ -f ~/.config/bashrc/exports ];
26 . ~/.config/bashrc/exports
29 if [ -f ~/.config/bashrc/functions ];
31 . ~/.config/bashrc/functions
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
46 if [ -f /usr/share/fzf/completion.bash ];
48 source /usr/share/fzf/completion.bash
51 if [ -f /usr/share/fzf/completion.bash ];
53 source /usr/share/fzf/key-bindings.bash
55 # autocomplete for sudo man and wich
56 complete -cf sudo man wich;
58 bind 'set show-all-if-ambiguous on';
59 bind 'TAB:menu-complete';
60 ###########################################################################
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
67 # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
70 export HISTIGNORE='&:ls:ll:la:cd:exit:clear:history'
71 ###########################################################################
75 # check the window size after each command and, if necessary,
76 # update the values of LINES and COLUMNS.
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