Once upon a time, Jason Montleon <jmont...@redhat.com> said:
> One of the things I discovered playing with tput last night trying
> some of this is that it will error if you don't have a terminal.
> ssh foo.example.com virsh start bar
> tput: No value for $TERM and no -T specified

My prompt manipulations are wrapped in a test like:

   if [ "$PS1" ]; then
      <do stuff here>
   fi

PS1 is not set on a non-interactive shell (no TTY assign), so don't do
anything to manipulate it if it isn't already set to something.

-- 
Chris Adams <li...@cmadams.net>
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to