Files
bash-it/plugins/available
Claudia 3f05d6b3fd Fix prompt issue for non-login subshells in OS X
This commit fixes an issue with themes on OS X which are sometimes
left in a partially broken environment with missing dependencies.

When a `BASH_IT_THEME` is active on OS X and has a
dynamic `PROMPT_COMMAND` which is not exported, and such
`PROMPT_COMMAND` is backed by shell functions which are not
exported either, and at the same time the theme is not
OS-X-aware (regarding `update_terminal_cwd`), and the
user launches a (non-login) interactive subshell from
the OS X Terminal, a `command not found` appears on every
command invocation.

The issue is caused by a regression in PR #514, which attempts to
inject `update_terminal_cwd` into the prompt. As a side effect, it
also escalates the exportedness of `PROMPT_COMMAND` while the
theme-specific backing functions (which power the dynamic prompt)
remain unexported.

The subshell cannot recover from this partially broken environment
because unlike in Linux, Bash-it on OS X is not invoked for non-login
subshells. The dependencies remain broken which leads to the error.

The fix is to preserve `PROMPT_COMMAND`’s exportedness on OS X,
leaving the individual theme responsible for consistently
exporting either all or nothing of its environment.
2016-04-22 19:27:18 +02:00
..
2016-04-05 08:04:47 +02:00
2015-10-21 09:25:52 +02:00
2012-05-13 22:13:54 -04:00
2016-03-27 00:03:40 +01:00
2014-10-27 17:39:29 +02:00
2014-10-23 11:13:59 +02:00
2015-06-18 11:51:51 -04:00
2012-05-13 22:13:54 -04:00
2015-09-06 19:18:14 +02:00
2012-05-21 11:50:01 +02:00
2012-05-13 22:13:54 -04:00
2016-01-05 23:34:10 +08:00
2015-04-01 13:23:00 +02:00
2015-07-26 12:49:37 +08:00
2015-11-16 16:13:32 +01:00
2012-05-16 13:00:22 -04:00