Le mar. 2 avr. 2019 à 23:00, Henry Bonath <he...@thebonaths.com> a écrit :
>
> Hello,
> Does anyone have any suggestions as to how to add the current rtable to the
> $PS1 prompt?
>
> I tend to flip back and forth between routing domains and tend to lose track
> of which rdomain I am currently using.
>
> I've been attempting an approach by trying to run 'ps -aux -o rtable'
> and using some grep/cut-fu but I am not happy with the results.
>
> Perhaps there is something simpler that I am missing?

Yes, `id -R` "Display the routing table of the current process":

PS1="[\u@$\h:\w](rdomain$(id -R))\$ "

Reply via email to