-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.bashrc
More file actions
72 lines (63 loc) · 2.44 KB
/
Copy path.bashrc
File metadata and controls
72 lines (63 loc) · 2.44 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
##############
### BASHRC ###
##############
# Test for an interactive shell and do nothing if not running
[[ $- != *i* ]] && return
# SHELL OPTIONS
shopt -s autocd # cd to directory only using name
shopt -s checkwinsize # Adjust to resized window
shopt -s histappend # Append to history file, don't overwrite
shopt -s extglob # Enable extended pattern matching features
shopt -s cdable_vars # Assumes that cd argument is variable with value=directory
shopt -s cdspell # Attempt cd directory spell correction
shopt -s cmdhist # Save multi-line commands in same history entry
shopt -s dirspell # Attempt directory spell correction
shopt -s direxpand # Directory name word expansion
shopt -s globstar # Find files recursively using globstar (**)
shopt -s nocaseglob # Case insensitive filename globbing
# MORE SHELL OPTIONS
HISTSIZE=99999 # Set session history length
HISTFILESIZE=99999 # Set total history length
HISTCONTROL='ignoredups' # Ignore duplicate commands
HISTIGNORE='ls:pwd:mkdir:cd:c:la:eb:sb' # Commands to ignore in history file
PROMPT_DIRTRIM=3 # Trim prompt to 3 subdirectories
# ENVIRONMENT VARIABLES
export WINMNT="/mnt/c/"
export DESKTOP="$WINMNT/Users/cestr/Desktop/"
export PROJECTS="$WINMNT/Users/cestr/Desktop/Projects/"
export THEOS="$HOME/theos"
export CARGO="$HOME/.cargo/bin"
export ASCII="$HOME/ascii"
export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
export GO="/usr/local/go/bin:/$HOME/go/bin"
export VBOX="/mnt/c/Programs\ Files/Oracle/VirtualBox"
export USRBIN="$HOME/bin"
export USRLOCALBIN="$HOME/.local/bin"
# CHECK PATH EXISTENCE
for DIRPATH in $THEOS $CARGO $ASCII $JAVA_HOME $GO $VBOX $USRBIN $USRLOCALBIN
do
if [ -d "$DIRPATH" ] ; then export PATH="$PATH:$DIRPATH"; fi
done
# WSL DISPLAY CONFIGURATION
export WSL_HOST=$(tail -1 /etc/resolv.conf | cut -d' ' -f2)
export LIBGL_ALWAYS_INDIRECT=1
export TERM=xterm-256color
# export DISPLAY=$WSL_HOST:0.0
# BLUE MOON CONFIGURATION
# export RABBITMQ_NODENAME=rabbit@localhost
# export VAGRANT_WSL_ENABLE_WINDOWS_ACCESS="1"
# export VAGRANT_WSL_WINDOWS_ACCESS_USER_HOME_PATH="$WSL_HOST/Users/Administrator/Desktop/zulip"
# export GO111MODULE=on
# USER PROMPT
BOLD="\[$(tput bold)\]"
BLU="\[\033[38;5;81m\]"
YEL="\[\033[0;33m\]"
RED="\[\033[0;31m\]"
DIR="[\w]\$ "
UNBOLD="\[$(tput sgr0)\]"
NONE="\[\033[0m\]"
PS1="$BOLD$BLU$DIR$UNBOLD$NONE"
if [ -f $HOME/.git_completion ]; then
BRANCH="\$(__git_branch)"
PS1="$YEL$BRANCH"$PS1
fi