MCPcopy Create free account
hub / github.com/ipython/ipython / compress_user

Function compress_user

IPython/core/completer.py:284–290  ·  view source on GitHub ↗

Does the opposite of expand_user, with its outputs.

(path:str, tilde_expand:bool, tilde_val:str)

Source from the content-addressed store, hash-verified

282
283
284def compress_user(path:str, tilde_expand:bool, tilde_val:str) -> str:
285 """Does the opposite of expand_user, with its outputs.
286 """
287 if tilde_expand:
288 return path.replace(tilde_val, '~')
289 else:
290 return path
291
292
293def completions_sorting_key(word):

Callers 2

magic_run_completerFunction · 0.70
cd_completerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected