How do you get bash to call a (bash) script every time someone hits enter?
I want the prompt to change every time it is displayed.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
See the bash man page for PROMPT_COMMAND. It sounds like you will want to set the value of PS1 in whatever function you set PROMPT_COMMAND to.