From d39ba532d4b6c22dca10c4b69d1a52b4643181d3 2012-06-17 06:40:23 From: Paul Ivanov Date: 2012-06-17 06:40:23 Subject: [PATCH] fix another FreeBSD $HOME symlink issue --- diff --git a/IPython/core/prompts.py b/IPython/core/prompts.py index 073fad3..8ac3c9b 100644 --- a/IPython/core/prompts.py +++ b/IPython/core/prompts.py @@ -137,6 +137,10 @@ def multiple_replace(dict, text): HOME = py3compat.str_to_unicode(os.environ.get("HOME","//////:::::ZZZZZ,,,~~~")) +# This is needed on FreeBSD, and maybe other systems which symlink /home to +# /usr/home, but retain the $HOME variable as pointing to /home +HOME = os.path.realpath(HOME) + # We precompute a few more strings here for the prompt_specials, which are # fixed once ipython starts. This reduces the runtime overhead of computing # prompt strings.