-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathbashrc.sh
More file actions
81 lines (64 loc) · 2.11 KB
/
bashrc.sh
File metadata and controls
81 lines (64 loc) · 2.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#!/bin/bash
# bashrc: part of the 4U6U57/dotfiles project
# Configuration for bash, sources a lot of other files
# If not running interactively, don't do anything
case $- in
*i*)
;;
*)
return;;
esac
# Duplicate definition of the one found in .bash_profile
sourcer() {
# sources files that actually exist
# shellcheck disable=SC1090
[[ -r "$1" ]] && [[ -f "$1" ]] && source "$1"
}
export -f sourcer
# PATH
export PATH="$PATH:$HOME/bin"
export PATH="$PATH:."
export PATH="$PATH:$HOME/sbin"
# Vim as default editor
export VISUAL="vim"
export EDITOR="vim"
# External scripts
sourcer ~/.bash_aliases
[[ $- = *i* ]] && sourcer ~/bin/liquidprompt/liquidprompt
# Autocompletion
CompletionDir=~/.completion
if [[ -d "$CompletionDir" ]]; then
for Script in "$CompletionDir"/*; do
sourcer "$Script"
done
fi
# From default bashrc in Ubuntu
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# Bash autocompletion
shopt -s cdspell # Autocorrect filenames
shopt -s nocaseglob # Case insensitive autocorrect
# Bash for Windows
if [[ $(uname -r) == *Microsoft ]]; then
# Add wsl-open as browser
export BROWSER=${BROWSER:wsl-open}
fi
# nvm stuff
export NVM_DIR="$HOME/.nvm"
sourcer "$NVM_DIR/nvm.sh" # This loads nvm
sourcer "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/home/avalera/google-cloud-sdk/path.bash.inc' ]; then source '/home/avalera/google-cloud-sdk/path.bash.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/home/avalera/google-cloud-sdk/completion.bash.inc' ]; then source '/home/avalera/google-cloud-sdk/completion.bash.inc'; fi
# added by pipx (https://github.com/pipxproject/pipx)
export PATH="/home/avalera/.local/bin:$PATH"