Skip to content

Conversation

n0ta26
Copy link

@n0ta26 n0ta26 commented May 29, 2025

Summary

This pull request adds support for replacing the absolute home directory path
with ~ in printed file paths, as suggested in issue #1688.

Details

  • Modified print_entry_uncolorized_base, print_entry_colorized, and other output functions to use replace_home_dir.
  • Ensured that this replacement works with --color=always, --color=never, and path separator options.
  • Added an integration test to confirm that paths under $HOME are displayed with ~.

Related Issue

Fixes #1688

n0ta26 added 2 commits May 30, 2025 00:40
This change replaces the absolute home directory path with `~` when printing
file paths to the output, making the output more readable and concise.

Fixes sharkdp#1688
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support ~ in results (for --color)

1 participant