Re: Some dumb questions born of frustration
Karl Wilbur <[email protected]>
| Newsgroups | gmane.linux.redhat.blinux.general |
|---|---|
| Message-ID | <CAMuGJSne4K5N8JZV1YBU54pseJEDYvWr7T7APrnKuxtaHiaS7Q@mail.gmail.com> |
Here's a like more detail on what you can do with your prompt: http://www.thegeekstuff.com/2008/09/bash-shell-ps1-10-examples-to-make-your-linux-prompt-like-angelina-jolie/ http://www.thegeekstuff.com/2008/09/bash-shell-take-control-of-ps1-ps2-ps3-ps4-and-prompt_command -- Karl Wilbur 513-322-2481 [email protected] On Oct 27, 2016 08:52, "Tim Chase" <[email protected]> wrote: > On October 27, 2016, Jeffery Mewtamer wrote: > > is there any way I could add a short indicator of the active > > terminal before the $? Something along the lines of tty2$ when I'm > > using tty2 and tty3$ when I'm using tty3. > > You should be able to change that to > > export PS1="$(tty)$" > > which would set your prompt to the full path, something like > > /dev/tty1$ > > You could trim off the leading "/dev/" with > > export PS1="$(tty | sed 's#^/dev/##')$" > > which would reduce it to just > > tty1$ > > This does merely assign it once when it's evaluated in your .bashrc, > so if you use something like reptyr(1) to move your shell to another > terminal, it won't update so you'd have to re-source your .bashrc > again. Not a big deal and not something your average user is apt to > encounter, but still something to keep in mind. > > -tim > > > > > _______________________________________________ > Blinux-list mailing list > [email protected] > https://www.redhat.com/mailman/listinfo/blinux-list > _______________________________________________ Blinux-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/blinux-list