Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make path short in case of big path and small window #6

Open
anki-code opened this issue Mar 28, 2023 · 1 comment
Open

Make path short in case of big path and small window #6

anki-code opened this issue Mar 28, 2023 · 1 comment
Labels
good first issue Good for newcomers

Comments

@anki-code
Copy link
Owner

anki-code commented Mar 28, 2023

/long/long/long/long/long/long/path -> .../long/path

Start lines -

lpc = _format_sections(_LEFT)
rpc = _format_sections(_RIGHT)

@anki-code anki-code added the good first issue Good for newcomers label Mar 28, 2023
@anki-code
Copy link
Owner Author

anki-code commented Feb 16, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant