-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Option to output colored file name only #78
Comments
Isn't this the same as #70? |
They are different. issue 70Add a user defined $root to every input entry issue 78output only the colored basename without the path orthogonalitya list of files could be passed as arguments with --root $root to be added to the files and --name-only would only return the basename of the file colored according to the file present int $root (ie could exist and be executable in $root). |
You can do this with bfs: $ bfs -color -prune -printf '%f\n' path/to/file1 path/to/file2
file1
file2 |
@tavianator I would but positive: bfs is faster than lscolors |
If you can |
I didn't get that far in the man page. I'll probably end up writing a wrapper called 'lscolors' around 'bfs' till I find the time to replace it, I just found out that I use lscolors in 25 different places in my code! |
See #80 for some changes related to this ticket. |
Given "aaa/bbb/entry" return only "color + entry + color reset".
Use case:
I have "$HOME/downloads", which happens to be a link, and a lot of other files from different directories in a list and want to colorize them.
The only way to get correct colorization is to be in the right directory for each entry in the list, this means starting a process for each entry and is prohibitively expensive.
I can send the full path but then I'd have to parse the colored string.
An alternative would be to output the colored path and the colored entry on different lines.
The text was updated successfully, but these errors were encountered: