From 9a3f41e63b694bc95ee11b6ed88b71c2f03e2ed2 Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Tue, 13 Aug 2019 07:57:00 -0700 Subject: [PATCH] Complete path after ~. Note this is mostly to discuss as if I understood one of your message on Twitter, this was not possible without fuzzy completion. I tried with just this patch and that works great. Note that unlike IPython that right now does : ~/ -> /Full/Path/to/user/home But with this patch this just complete things correctly without expanding the tab. And I think not expanding the tab is actually better. Anyway, open that to better understand the why you were waiting for fuzzy completion. --- jedi/api/file_name.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jedi/api/file_name.py b/jedi/api/file_name.py index 542b5957..6fbecace 100644 --- a/jedi/api/file_name.py +++ b/jedi/api/file_name.py @@ -37,6 +37,8 @@ def file_name_completions(evaluator, module_context, start_leaf, string, like_name_length = len(os.path.basename(string) + like_name) addition = _get_string_additions(module_context, start_leaf) + if string.startswith('~'): + string = os.path.expanduser(string) if addition is None: return string = addition + string