Skip to content

Use $- to determine if interactive#5

Open
gaelicWizard wants to merge 1 commit intojosephwecker:masterfrom
gaelicWizard:PS1
Open

Use $- to determine if interactive#5
gaelicWizard wants to merge 1 commit intojosephwecker:masterfrom
gaelicWizard:PS1

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