Skip to content

Conversation

@dscorbett
Copy link
Contributor

Fixes #91.

@mosabua
Copy link
Collaborator

mosabua commented Jan 13, 2020

That seems fine to me .. although is it really only the Apple terminal that is affected .. what it other console like iterm is used?

@dscorbett
Copy link
Contributor Author

On macOS, /etc/bashrc ends with [ -r "/etc/bashrc_$TERM_PROGRAM" ] && . "/etc/bashrc_$TERM_PROGRAM". In iTerm and iTerm2, TERM_PROGRAM is iTerm.app. Only /etc/bashrc_Apple_Terminal exists by default, which is the file responsible for these session termination messages. I checked for specifically [ "$TERM_PROGRAM" = "Apple_Terminal" ] because that is the only terminal where I could reproduce the problem. On the other hand, I suppose it is safe enough to (re)define shell_session_save unconditionally. I’ll push that change shortly.

@mosabua
Copy link
Collaborator

mosabua commented Jan 13, 2020

Does that have any negative effects on Linux ?

@dscorbett
Copy link
Contributor Author

I tried it on Linux without any difference in behavior. shell_session_save is a macOS thing; I don’t think it is used on Linux. Even if it is, its effect is highly limited in scope, since _realpath is only ever called in a subshell.

@mosabua
Copy link
Collaborator

mosabua commented Jan 13, 2020

Excellent .. I am good with this then. @juven ?

@mosabua mosabua merged commit 66c63ce into juven:master Apr 21, 2020
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.

Completion is sometimes ending my Bash Session on Mac OS

2 participants