Join rc and rc.local folders
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
function auto_expand() {
|
||||
# https://forum.root.cz/index.php?topic=16821.0
|
||||
# Override some functionality from bash-completion
|
||||
_expand() { :; }
|
||||
__expand_tilde_by_ref() { :; }
|
||||
_filedir_xspec () { :; }
|
||||
|
||||
shopt -s direxpand
|
||||
|
||||
#shopt -u complete_fullquote
|
||||
#shopt -s direxpand
|
||||
#shopt -u progcomp
|
||||
#shopt -s cdable_vars
|
||||
}
|
||||
|
||||
auto_expand()
|
||||
|
||||
3
rc/cargo.sh
Normal file
3
rc/cargo.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
if [[ -f "$HOME/.cargo/env" ]]; then
|
||||
source "$HOME/.cargo/env"
|
||||
fi
|
||||
13
rc/git-prompt.sh
Normal file
13
rc/git-prompt.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
if [ -d "$HOME/.bash-git-prompt" ]; then
|
||||
GIT_PROMPT_PATH="$HOME/.bash-git-prompt"
|
||||
else
|
||||
GIT_PROMPT_PATH="$LWS/opt/bash-git-prompt"
|
||||
fi
|
||||
|
||||
GIT_PROMPT_INIT="$GIT_PROMPT_PATH/gitprompt.sh"
|
||||
|
||||
if [ -f "$GIT_PROMPT_INIT" ]; then
|
||||
export GIT_PROMPT_PATH
|
||||
GIT_PROMPT_ONLY_IN_REPO=1
|
||||
source "$GIT_PROMPT_INIT"
|
||||
fi
|
||||
36
rc/linuxbrew.sh
Normal file
36
rc/linuxbrew.sh
Normal file
@@ -0,0 +1,36 @@
|
||||
# Homebrew initialization
|
||||
# Can set BREW_HOME in advance
|
||||
|
||||
xlog "Homebrew initialization"
|
||||
|
||||
BREW_LOCATIONS=(
|
||||
"$HOME/.local/share/linuxbrew"
|
||||
"$HOME/.linuxbrew"
|
||||
"/home/linuxbrew/.linuxbrew"
|
||||
)
|
||||
|
||||
if [[ -z "$BREW_HOME" ]]; then
|
||||
for brew_path in "${BREW_LOCATIONS[@]}"; do
|
||||
xlog "CHECK $brew_path"
|
||||
if [[ -d "$brew_path" ]]; then
|
||||
BREW_HOME="$brew_path"
|
||||
xlog "FOUND $BREW_HOME"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
BREW="$BREW_HOME/bin/brew"
|
||||
|
||||
if [[ -e "$BREW" ]]; then
|
||||
xlog "Loading brew shell environment from $BREW_HOME"
|
||||
path_backup="$PATH"
|
||||
eval "$($BREW shellenv)"
|
||||
PATH="$path_backup"
|
||||
|
||||
append_path "$HOMEBREW_PREFIX/bin"
|
||||
append_path "$HOMEBREW_PREFIX/sbin"
|
||||
fi
|
||||
|
||||
unset BREW
|
||||
unset BREW_LOCATIONS
|
||||
4
rc/oracle-oci.sh
Normal file
4
rc/oracle-oci.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
# Oracle OCI bash autocomplete
|
||||
|
||||
OCI_AUTOCOMPLETE="$HOME/lib/oracle-cli/lib/python3.10/site-packages/oci_cli/bin/oci_autocomplete.sh"
|
||||
source_try "$OCI_AUTOCOMPLETE"
|
||||
13
rc/pyenv.sh
Normal file
13
rc/pyenv.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
# Initialize pyenv
|
||||
|
||||
if is_slow_init; then
|
||||
PYENV_ROOT="${PYENV_ROOT:-$HOME/.pyenv}"
|
||||
if [[ -d "$PYENV_ROOT" ]]; then
|
||||
export PYENV_ROOT
|
||||
if ! can_run pyenv; then
|
||||
append_path "$PYENV_ROOT/bin"
|
||||
fi
|
||||
eval "$(pyenv init -)"
|
||||
eval "$(pyenv virtualenv-init -)"
|
||||
fi
|
||||
fi
|
||||
5
rc/sdkman.sh
Normal file
5
rc/sdkman.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
nop "${SDKMAN_DIR:=$HOME/.sdkman}"
|
||||
if [[ -d $SDKMAN_DIR ]]; then
|
||||
export SDKMAN_DIR
|
||||
source_try "$SDKMAN_DIR/bin/sdkman-init.sh"
|
||||
fi
|
||||
3
rc/thefuck.sh
Normal file
3
rc/thefuck.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
if is_slow_init && can_run thefuck; then
|
||||
eval "$(thefuck --alias)"
|
||||
fi
|
||||
10
rc/wsl.sh
Normal file
10
rc/wsl.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
function is_wsl()
|
||||
{
|
||||
grep -q -i wsl /proc/version
|
||||
}
|
||||
|
||||
if is_wsl; then
|
||||
prepend_path_try "$HOME/.local/bin"
|
||||
append_path_try "$HOME/.arkade/bin"
|
||||
append_path_try "$HOME/.cargo/bin"
|
||||
fi
|
||||
@@ -1,5 +0,0 @@
|
||||
# Load user locals bashrc
|
||||
|
||||
source_directory_sh "$LWS/rc.local"
|
||||
# user operations are in the end to have change to change everyting/anything
|
||||
source_directory_sh "$HOME/.bashrc.d"
|
||||
Reference in New Issue
Block a user