Skip to content

Conversation

@gaelicWizard
Copy link

Instead of checking for environment variable $PS1 (which could be blindly set by a user or script somewhere), ask Bash if it is interactive by interrogating $- automatic variable. If it contains 'i' then the shell was started interactively.

Instead of checking for environment variable $PS1 (which could be blindly set by a user or script somewhere), ask Bash if it is interactive by interrogating $- automatic variable. If it contains 'i' then the shell was started interactively.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant