MCPcopy Index your code
hub / github.com/ipython/ipython / compress_user

Function compress_user

IPython/core/completer.py:411–417  ·  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

409
410
411def compress_user(path:str, tilde_expand:bool, tilde_val:str) -> str:
412 """Does the opposite of expand_user, with its outputs.
413 """
414 if tilde_expand:
415 return path.replace(tilde_val, '~')
416 else:
417 return path
418
419
420def completions_sorting_key(word):

Callers 2

magic_run_completerFunction · 0.70
cd_completerFunction · 0.70

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…