question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: strip prefix from filenames

See original GitHub issue

I 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:open
  • Created 2 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
robin-wayvecommented, Aug 9, 2021

Yep, makes sense. Thanks for an awesome tool!

1reaction
sumerccommented, Aug 9, 2021

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found