bash_it.sh: Require interactive shell

Previously, a fix was added for bad behavior when `bash-it` printed text
to the console in conjunction with protocols like `SCP`, as commit
83c44fac "template/profile: Require interactive shell".

It did work for those users who replace their original `~/.bash_profile`
file with the one provided by `bash-it`, but not for those who merely
append a `bash-it` call to their existing `~/.bash_profile` file.

Fix the behavior for the latter case, too.
pull/1533/head
Alex Thiessen 2019-02-04 23:32:39 +01:00
parent 30f0efe873
commit 2c7e9e7ab3
No known key found for this signature in database
GPG Key ID: 6C90AE2B18A1CF5B
1 changed files with 6 additions and 0 deletions

View File

@ -1,6 +1,12 @@
#!/usr/bin/env bash
# Initialize Bash It
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# Only set $BASH_IT if it's not already set
if [ -z "$BASH_IT" ];
then