profile: remove unneeded environment variable
This commit is contained in:
parent
b8807ca1de
commit
590c5f4f8b
3 changed files with 10 additions and 4 deletions
|
@ -7,7 +7,8 @@ while read -r f; do [ -f "$f" ] && source "$f"; done <<EOL
|
||||||
EOL
|
EOL
|
||||||
unset f
|
unset f
|
||||||
|
|
||||||
stty stop undef # Prevent ctrl-s from freezing the terminal.
|
# Prevent ctrl-s from freezing the terminal.
|
||||||
|
stty stop undef
|
||||||
|
|
||||||
shopt -s cdspell checkwinsize globstar histappend nocaseglob
|
shopt -s cdspell checkwinsize globstar histappend nocaseglob
|
||||||
set -o noclobber # Prevent overwriting files with output redirection.
|
set -o noclobber # Prevent overwriting files with output redirection.
|
||||||
|
@ -19,6 +20,7 @@ HISTSIZE=
|
||||||
HISTTIMEFORMAT="[%F %T] "
|
HISTTIMEFORMAT="[%F %T] "
|
||||||
HISTFILE="$XDG_DATA_HOME/bash/history"
|
HISTFILE="$XDG_DATA_HOME/bash/history"
|
||||||
|
|
||||||
|
# Prompt configuration.
|
||||||
Reset="\[$(tput sgr0)\]"
|
Reset="\[$(tput sgr0)\]"
|
||||||
PS1_EXIT="\[$(tput setaf "$Red" )\]" # color for last exit code if non-zero
|
PS1_EXIT="\[$(tput setaf "$Red" )\]" # color for last exit code if non-zero
|
||||||
PS1_ROOT="\[$(tput setaf "$Orange" )\]" # logged in as root
|
PS1_ROOT="\[$(tput setaf "$Orange" )\]" # logged in as root
|
||||||
|
@ -57,11 +59,12 @@ __ps1_set() {
|
||||||
PS1="${ps[0]}$extra$sep_color ${prompt:0:$SHLVL}$Reset "
|
PS1="${ps[0]}$extra$sep_color ${prompt:0:$SHLVL}$Reset "
|
||||||
} &>/dev/null
|
} &>/dev/null
|
||||||
|
|
||||||
|
# Source extra configurations if available.
|
||||||
_source_extra_configs() {
|
_source_extra_configs() {
|
||||||
local configs=(
|
local configs=(
|
||||||
/usr/local/etc/profile.d/bash_completion.sh
|
/usr/local/etc/profile.d/bash_completion.sh
|
||||||
/usr/share/bash-completion/bash_completion
|
/usr/share/bash-completion/bash_completion
|
||||||
$LOCAL_CONFIG/bash/*
|
$HOME/.local/etc/bash/*
|
||||||
)
|
)
|
||||||
local f
|
local f
|
||||||
for f in ${configs[@]}; do [ -f "$f" ] && source "$f"; done
|
for f in ${configs[@]}; do [ -f "$f" ] && source "$f"; done
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Environment variables are set here for login shells.
|
# Environment variables are set here for login shells.
|
||||||
|
|
||||||
|
# Keep things organized.
|
||||||
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
|
export XDG_CACHE_HOME="${XDG_CACHE_HOME:-$HOME/.cache}"
|
||||||
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
|
||||||
export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
|
export XDG_DATA_HOME="${XDG_DATA_HOME:-$HOME/.local/share}"
|
||||||
|
|
||||||
|
# General environment settings.
|
||||||
export INPUTRC="$XDG_CONFIG_HOME/readline/inputrc"
|
export INPUTRC="$XDG_CONFIG_HOME/readline/inputrc"
|
||||||
export LANG="en_US.UTF-8"
|
export LANG="en_US.UTF-8"
|
||||||
export LANGUAGE="en_US"
|
export LANGUAGE="en_US"
|
||||||
|
@ -13,7 +15,6 @@ export LC_CTYPE="en_US.UTF-8"
|
||||||
export LESS="-i -j.49 -M -R -z-2"
|
export LESS="-i -j.49 -M -R -z-2"
|
||||||
export LESSHISTFILE="$XDG_DATA_HOME/less/history"
|
export LESSHISTFILE="$XDG_DATA_HOME/less/history"
|
||||||
export LESSHISTSIZE=1000
|
export LESSHISTSIZE=1000
|
||||||
export LOCAL_CONFIG="$HOME/.local/etc"
|
|
||||||
export LOCAL_PREFIX="/usr/local"
|
export LOCAL_PREFIX="/usr/local"
|
||||||
export PAGER=less
|
export PAGER=less
|
||||||
export PYTHONSTARTUP="$XDG_CONFIG_HOME/python/startup.py"
|
export PYTHONSTARTUP="$XDG_CONFIG_HOME/python/startup.py"
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
#!/bin/zsh
|
#!/bin/zsh
|
||||||
# Set up zsh for interactive use (options, prompt, aliases, etc.)
|
# Set up zsh for interactive use (options, prompt, aliases, etc.)
|
||||||
|
|
||||||
|
# Source additional configurations if available.
|
||||||
while read -r f; do [ -f "$f" ] && source "$f"; done <<EOL
|
while read -r f; do [ -f "$f" ] && source "$f"; done <<EOL
|
||||||
${XDG_CONFIG_HOME}/shell/aliases
|
${XDG_CONFIG_HOME}/shell/aliases
|
||||||
${XDG_CONFIG_HOME}/shell/solarized
|
${XDG_CONFIG_HOME}/shell/solarized
|
||||||
EOL
|
EOL
|
||||||
unset f
|
unset f
|
||||||
|
|
||||||
stty stop undef # Prevent ctrl-s from freezing the terminal.
|
# Prevent ctrl-s from freezing the terminal.
|
||||||
|
stty stop undef
|
||||||
|
|
||||||
# Save a lot of history in the cache directory.
|
# Save a lot of history in the cache directory.
|
||||||
HISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/zsh/history"
|
HISTFILE="${XDG_CACHE_HOME:-$HOME/.cache}/zsh/history"
|
||||||
|
|
Loading…
Add table
Reference in a new issue