From d4a2f309ca2c5acff1a8b76efe4d0b4d2c53c612 2018-11-08 03:06:44 From: Elliott Morgan Jobson Date: 2018-11-08 03:06:44 Subject: [PATCH] Updated to use the operating system's path delimiter in the displayed path suggestion #11441 --- diff --git a/IPython/terminal/ptutils.py b/IPython/terminal/ptutils.py index 312b4d0..bc22f8e 100644 --- a/IPython/terminal/ptutils.py +++ b/IPython/terminal/ptutils.py @@ -47,7 +47,7 @@ def _elide(string, *, min_elide=30): return '{}.{}\N{HORIZONTAL ELLIPSIS}{}.{}'.format(object_parts[0], object_parts[1][0], object_parts[-2][-1], object_parts[-1]) elif len(file_parts) > 3: - return '{}/{}\N{HORIZONTAL ELLIPSIS}{}/{}'.format(file_parts[0], file_parts[1][0], file_parts[-2][-1], file_parts[-1]) + return ('{}' + os.sep + '{}\N{HORIZONTAL ELLIPSIS}{}' + os.sep + '{}').format(file_parts[0], file_parts[1][0], file_parts[-2][-1], file_parts[-1]) return string