pfr was wondering how to get directory path in the PS1.
The question was not addressed to me but, I'll answer it anyway 😁
pfr can I see your .shrc please?
I'm using ksh
and usually I have,
# .shrc file for sh(1).
ll(){ ls -l ${1+"$@"}; }
case "$-" in *i*)
if /bin/test -z "${HOST}"; then
HOST="$(hostname)"
fi
PS1="${USER}@${HOST%%.*} $PS1"
set -o emacs
;;
esac
which, will result in,
pin@mybox $
But, if I change it to,
# .shrc file for sh(1).
ll(){ ls -l ${1+"$@"}; }
case "$-" in *i*)
if /bin/test -z "${HOST}"; then
HOST="$(hostname)"
fi
PS1="${USER}@${HOST%%.*}: \${PWD} $ "
set -o emacs
;;
esac
then, I get the following shell prompt,
pin@mybox: /home/pin $
😉
EDIT: As for your other question,...
you could use this web-site to generate ascii from text and edit your /etc/motd
file. You can also modify /boot.cfg
if you want it to display at boot.
WARNING: Be careful, though... some of the resulting ascii's might be too large to display and get you into trouble.