Dienstag, 8. September 2015

Minimalistic prompt (PS1)

The most usefull and minimalstic command prompt i can imagine for scripters or sys-admins:
PROMPT_COMMAND='RET=$?'
RET_VAL="$(echo $RET)"
export PS1="$RET_VAL \\$ "
If if its within a terminal window, you'll see the path you're in in the task- or titlebar.
If you really want to have the path in your shell, try this line:
export PS1="$RET_VALUE \W \\$ "

Hope you enjoy and have fun!

Keine Kommentare: