.profile: Fix non-POSIX parameter substitution
This commit is contained in:
parent
373654c000
commit
5dff2dca30
7
.profile
7
.profile
@ -25,6 +25,7 @@
|
||||
# If it is not, open a bug report at gitlab.com/rehashedsalt/home and I'll take
|
||||
# care of it
|
||||
|
||||
# SHELLCHECK
|
||||
# Not finding these sources is none of my concern; they're out of scope
|
||||
# shellcheck disable=1091
|
||||
# shellcheck disable=1090
|
||||
@ -180,7 +181,11 @@ _ps1() {
|
||||
;;
|
||||
esac
|
||||
# Show the tilde instead of $HOME
|
||||
cpwd="${PWD/#$HOME/\~}"
|
||||
if [ "${PWD#$HOME}" != "$PWD" ]; then
|
||||
cpwd="~${PWD#$HOME}"
|
||||
else
|
||||
cpwd="$PWD"
|
||||
fi
|
||||
# Alert us if the last command failed
|
||||
fail=""
|
||||
if ! [ "$exitcode" = "0" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user