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

Add a path_display strategy that replaces home directory with tilde #3095

Open
bluss opened this issue May 11, 2024 · 0 comments
Open

Add a path_display strategy that replaces home directory with tilde #3095

bluss opened this issue May 11, 2024 · 0 comments
Labels
enhancement Enhancement to performance, inner workings or existent features

Comments

@bluss
Copy link

bluss commented May 11, 2024

Absolute paths show up in in file search / grep in some contexts.

It would improve legibility if /home/foouser was replaced with ~ in file search results in these cases. Add a strategy that can be configured for path_display that does this substitution. Preferably in a way so that it can be composed with shorten or other path display functions.

Before:

/home/foouser/.local/lib/python3.20/site-packages/numpy/__init__.py

After:

~/.local/lib/python3.20/site-packages/numpy/__init__.py

@bluss bluss added the enhancement Enhancement to performance, inner workings or existent features label May 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement to performance, inner workings or existent features
Projects
None yet
Development

No branches or pull requests

1 participant