Locate function(s) at top of script, prioritize PATH

This commit is contained in:
John Mertz 2024-01-31 22:02:32 -07:00
parent 12f55d0e47
commit 484b80ad57
1 changed files with 9 additions and 8 deletions

View File

@ -1,5 +1,14 @@
# vim: ft=sh # vim: ft=sh
# Get last run command
function last_command {
local h="$(history 1)";
echo "${h##*([[:space:])+([[:digit:]])+([[:space:]])}"
}
# Configure PATH
source "$HOME/.dotfiles/bash/path"
# GUI themes # GUI themes
export GTK_THEME="Gruvbox" export GTK_THEME="Gruvbox"
export ICON_THEME="Gruvbox" export ICON_THEME="Gruvbox"
@ -56,11 +65,6 @@ if [[ -z $TERM_TITLE ]]; then
TERM_TITLE="$TERM"; TERM_TITLE="$TERM";
fi fi
# Set window title to last command
function last_command {
local h="$(history 1)";
echo "${h##*([[:space:])+([[:digit:]])+([[:space:]])}"
}
PS0='\[\e]0;$(last_command) - $TERM_TITLE\a\]' PS0='\[\e]0;$(last_command) - $TERM_TITLE\a\]'
# Update prompt # Update prompt
PROMPT_COMMAND="source ${HOME}/.dotfiles/bash/prompt.sh" PROMPT_COMMAND="source ${HOME}/.dotfiles/bash/prompt.sh"
@ -88,9 +92,6 @@ fi
JDK_HOME=/etc/java JDK_HOME=/etc/java
STUDIO_JDK=/usr/lib/jvm/jre-openjdk STUDIO_JDK=/usr/lib/jvm/jre-openjdk
# Configure PATH
source "$HOME/.dotfiles/bash/path"
export LANG="C.UTF-8" export LANG="C.UTF-8"
export LC_ALL="C.UTF-8" export LC_ALL="C.UTF-8"
export LC_CTYPE="C.UTF-8" export LC_CTYPE="C.UTF-8"