Skip to content

Piero Bosio Social Web Site Personale Logo Fediverso

Social Forum federato con il resto del mondo. Non contano le istanze, contano le persone

Do you run Bash on FreeBSD and want your cursor-prompt to always be in the top left?

Uncategorized
1 1 0
  • Do you run Bash on FreeBSD and want your cursor-prompt to always be in the top left? At the bottom of your ~/.bashrc you can add the lines

    PS0="$(tput cl)"
    PS1="$(tput ho)$PS1"

    (depending on whether your system uses termcap-vs-terminfo, those might need to be "tput clear" and "tput home" respectively)

    The $PS1 moves the cursor to the top/home position before displaying your normal/previous $PS1

    The $PS0 clears from the cursor to the end of the screen before running the command you typed.

    Is it useful? Maybe to somebody. Would it drive me bonkers? Absolutely. But did it amuse me to figure out how to do this? You bet 😆

  • Stefano Marinelliundefined Stefano Marinelli shared this topic

Gli ultimi otto messaggi ricevuti dalla Federazione
Post suggeriti