Skip to content

Commit

Permalink
Slight impriovements to bashmatic-install
Browse files Browse the repository at this point in the history
  • Loading branch information
kigster committed Mar 3, 2022
1 parent 92a46a8 commit b5f55e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.5.2
2.6.0
6 changes: 4 additions & 2 deletions bin/bashmatic-install
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,8 @@ function .install.current-shell() {
}
(
# deterministicaly figure out our currently loaded shell.
current_shell="$(basename $(/bin/ps -p $$ -o args | grep -v -E 'ARGS|COMMAND' | cut -d ' ' -f 1 | sed -E 's/-//g'))"
local bash_process="$(/bin/ps -p $$ -o args | grep -v -E 'ARGS|COMMAND' | cut -d ' ' -f 1 | sed -E 's/-//g')"
current_shell="$(basename "${bash_process:-bash}")"
export current_shell
if [[ "${current_shell}" =~ zsh ]]; then
command -v zsh
Expand Down Expand Up @@ -597,7 +598,8 @@ function .install.canonical-dir() {
function .install.print-directories() {
local dir="$(.install.canonical-dir)"
local source="$(.install.canonical-source)"
local source_script="$(basename "${source}")"
local source_script
[[ -n "${source}" ]] && source_script="$(basename "${source}")"
printf -- "BASH-install's directory : ${bldgrn}%-40s${clr}\n" "${dir}"
printf -- "BASH-install's full path : ${bldgrn}%-40s${clr}\n" "${dir}/${source_script}"
printf -- "Active shell right now : ${bldgrn}%-20s${clr}\n" "$(.install.current-shell | sed -E 's/[ ]//g' | tr -d ' ')"
Expand Down

0 comments on commit b5f55e8

Please sign in to comment.