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

Ignore $PROMPT text in backward searches #132

Open
bedge opened this issue Oct 29, 2018 · 2 comments
Open

Ignore $PROMPT text in backward searches #132

bedge opened this issue Oct 29, 2018 · 2 comments

Comments

@bedge
Copy link

bedge commented Oct 29, 2018

My prompt matches both path and numeric seaches:

 29/10/18 07:40:54 ~ 🐍 p3 
❯

I use this for auditing purposes, along with logging.

While it would be possible to introspect the $PROMPT/$PS1 and figure out what to ignore, I'd be happy with being able to specify a regex to ignore as well.
In fact, that may provide better flexibility for unforeseen use cases.

@micimize
Copy link

Seconded - the fact that copycat doesn't at bare minimum have a configuration for this makes it pretty unusable for me with a prompt like 01-16 10:39 > ~/Doc…/code/ which matches both the file and number patterns

@Drowze
Copy link

Drowze commented Dec 7, 2023

Stumbled on this... Would love to see this builtin tmux.

For context, my prompt is something like (consider I'm on ~/workspace/my-projects)

β‹Š> ~/w/my-projects/ 

And I have the following pattern in my tmux config, for grepping for filenames in my pane. It unfortunately matches my prompt as well and I couldn't manage to fix yet...

bind C-f copy-mode \; send -X search-backward "(^|^\.|[[:space:]]|[[:space:]]\.|[[:space:]]\.\.|^\.\.)[[:alnum:]~_-]*/[][[:alnum:]_.#$%&+=/@-]*"

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

No branches or pull requests

3 participants