Open anki-code opened 1 year ago
Example:
$PROMPT_FIELDS['cwd4'] = lambda: str(Path(*Path(__xonsh__.env['PROMPT_FIELDS']['cwd']()).expanduser().parts[-4:]))
$XONTRIB_PROMPT_BAR_LEFT = '{hostname#nolocal}{user#nolocal}{cwd4#accent}'
xontrib load prompt_bar
/long/long/long/long/long/long/path
->.../long/path
Start lines - https://github.com/anki-code/xontrib-prompt-bar/blob/fce5308375f037f227eb6058518a34724741b23c/xontrib/prompt_bar.py#L151-L152