Feature request: strip prefix from filenames
See original GitHub issueI tried using yappi
on some code that is executed through Bazel and it was difficult to read the stats because the paths all begin with an identical, deep prefix. Something like this:
/home/user/.cache/bazel/_bazel_user/a1901621c7221d386cf4d8fa1b80a433/sandbox/sandboxfs/5/code/bazel-out/k8-opt/bin/path/in/project/target.runfiles/<the bit I actually care about starts here>
A --prefix
or --strip-prefix
option that would allow me to drop the predictable and repeated parts of file paths would be a help to be able to focus on the more interesting part at the end.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Remove prefixes from filenames - Unix & Linux Stack Exchange
I need to rename them to exclude the prefix. It needs to look like this.. b0294.DAT20120807164534 b0297.DAT20120807164713 b0296.
Read more >Remove executor_ prefix from filenames in the ... - GitLab
What does this MR do? Removes unnecessary executor_ prefix from filenames in the executors package.
Read more >Option for basename to strip prefix in stead of suffix
The tool basename should have an option to strip prefix in stead of suffix. Now it can only cut off characters at the...
Read more >Preview for file name with prefix and suffix when exporting for ...
Illustrator (Desktop) Feature Requests ... I have three requests about Prefix for filenames - 1. Move it to a more prominent area where...
Read more >How to remove filename prefix with a Posix shell
Due to popular requests (the single comment below), here is how to rename all files in the directory that start with XY TD-...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep, makes sense. Thanks for an awesome tool!
I see.
I agree that a bit of flexibility to filter some prefixes on the output would be useful. Will implement this in the next version! I still think
--omit-sys-path
might be a good improvement for some cases as well which will not be on by default(of course). Maybe I will implement both.Again: Thanks for the idea!