shell: fix some aliases, 80c PS1 length

This commit is contained in:
2024-06-02 14:42:51 +02:00
parent 5015a08ab9
commit 450af8d7f7
3 changed files with 9 additions and 1 deletions

View File

@@ -34,6 +34,11 @@ NEWLINE=$'\n'
PROMPT_COMMAND=__prompt_command
__prompt_command() {
local EXIT="$?"
if [ $COLUMNS -lt 80 ]; then
export PROMPT_DIRTRIM=1
else
export PROMPT_DIRTRIM=0
fi
export PS1="${HOST} ${DIR} ${GIT_NIX}${NEWLINE}"
if [[ $(uname) == "OpenBSD" ]]; then