1515# If not running interactively or as a CI build, skip it.
1616[[ -z " ${JOB_NAME} " && -z " ${GITHUB_ACTIONS} " && -z " ${PS1} " && -z " ${PS2} " ]] && return
1717
18+ echo -e " \033[1;34m[${SHELL##* \/ } ] HomeSetup is starting...\033[m"
19+
1820export HHS_ACTIVE_DOTFILES=" ${HHS_ACTIVE_DOTFILES} zshrc"
1921
2022# Unset other used variables
@@ -142,9 +144,10 @@ if [[ -f "${HHS_DIR}/.path" ]]; then
142144 done
143145fi
144146
145- # HomeSetup paths
147+ # ZSH missing paths
146148brew_path=" /opt/homebrew/bin"
147- PATH=" ${brew_path: h} :${PATH} "
149+ ruby_path=" $( ruby -e ' puts Gem.bindir' ) "
150+ PATH=" ${brew_path: h} :${ruby_path} :${PATH} "
148151# Remove PATH duplicates.
149152PATH=$( awk -F: ' {for (i=1;i<=NF;i++) { if ( !x[$i]++ ) printf("%s:",$i); }}' <<< " ${PATH}" )
150153export PATH
@@ -158,6 +161,7 @@ setopt share_history
158161setopt hist_expire_dups_first
159162setopt hist_ignore_dups
160163setopt hist_verify
164+ setopt auto_cd
161165
162166# Alias definitions
163167if ! [[ -s " ${HHS_ALIASDEF} " ]]; then
259263# Workaround to fix missing __hhs_functions
260264
261265# Print HomeSetup MOTDs.
262- MOTD=" ${ORANGE} [${HHS_MY_OS} -${HHS_MY_OS_RELEASE} /${HHS_MY_SHELL} ] ${WHITE}${HAND_PEACE_ICN}
263- ${GREEN} Welcome ${USER:- user} to HomeSetup ${BLUE} v${HHS_VERSION}
264- ${NC} "
265-
266- echo -e " ${MOTD} "
267-
268- # Unalias any hhs found because we need this name to use for HomeSetup
269- unalias hhs & > /dev/null
270- command -v & > /dev/null ' hhs' && __hhs_log " ERROR" " 'hhs' is already defined: $( command -v ' hhs' ) "
271-
272- # @function: Wrapper to either invoke the hhs application or change to HHS_HOME or HHS_DIR.
273- # @param $* [Opt] : All parameters are passed to hhs.bash.
274- function __hhs() {
275-
276- if [[ -z " ${1} " || " ${1} " == ' home' ]]; then
277- \c d " ${HHS_HOME} " || return 1
278- elif [[ " ${1} " == ' dir' ]]; then
279- \c d " ${HHS_DIR} " || return 1
280- else
281- hhs.bash " ${@ } " || return 1
282- fi
283-
284- return 0
285- }
266+ echo -e " \033[H\033[J"
267+ echo -en " ${ORANGE} [${HHS_MY_OS} -${HHS_MY_OS_RELEASE} /${HHS_MY_SHELL} ] ${WHITE}${HAND_PEACE_ICN} "
268+ echo -e " ${GREEN} Welcome ${USER:- user} to HomeSetup ${BLUE} v${HHS_VERSION}${NC} \n"
286269
287270alias cd=' \cd'
288- alias ..=..
271+ alias ..=' cd ..'
272+ alias ...=' cd ../../'
273+ alias ....=' cd ../../../'
274+ alias .....=' cd ../../../../'
289275alias \? =' \pwd'
290276alias dirs=' \dirs'
291277alias du=' \du'
292278alias open=' \open'
293279alias shopt=' \shopt'
294280alias hhs=' __hhs'
281+ alias gta=' git add'
295282
296283# -----------------------------------------------------------------------------------
297284# Finalization
0 commit comments