-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.bashrc
More file actions
58 lines (46 loc) · 1.71 KB
/
Copy path.bashrc
File metadata and controls
58 lines (46 loc) · 1.71 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
# ~/.bashrc
#
for file in ~/.{aliases,exports}; do
[ -r "$file" ] && [ -f "$file" ] && source "$file";
done;
unset file;
source ~/.aliases
source ~/.exports
# nvm
source /usr/share/bash-completion/completions/git
if [[ -d /usr/share/nvm/init-nvm.sh ]]; then source /usr/share/nvm/init-nvm.sh; fi
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
# Avoid duplicates
HISTCONTROL=ignoredups:erasedups
# When the shell exits, append to the history file instead of overwriting it
shopt -s histappend
# After each command, append to the history file and reread it
PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"
#starship
eval "$(starship init bash)"
# Avoid duplicates
HISTCONTROL=ignoredups:erasedups
# When the shell exits, append to the history file instead of overwriting it
shopt -s histappend
# After each command, append to the history file and reread it
PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"
# use vi bindings
set -o vi
alias nvim-astro="NVIM_APPNAME=AstroNvim nvim"
alias nvim-nvchad="NVIM_APPNAME=NvChadNvim nvim"
alias nvim-lunar="NVIM_APPNAME=LunarNvim nvim"
nvims() {
items=("default" "AstroNvim" "NvChadNvim" "LunarNvim")
config=$(printf "%s\n" "${items[@]}" | fzf --prompt=" Neovim Config " --height=~50% --layout=reverse --border --exit-0)
if [[ -z $config ]]; then
echo "Nothing selected"
return 0
elif [[ $config == "default" ]]; then
config=""
fi
echo "$config" > ~/.last_nvim_config
NVIM_APPNAME=$config nvim $@
}
bind '\C-a':"nvims\n"
export PATH="$PATH:/opt/mssql-tools/bin"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion