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

[Search history] simplify logic into pipeline #255

Merged
merged 3 commits into from
Aug 8, 2022
Merged

Conversation

PatrickF1
Copy link
Owner

@PatrickF1 PatrickF1 commented Aug 8, 2022

A small flaw with #252 was that it didn't preserve the boundaries between commands and so at the end, it had to check each line of output for the timestamps and remove them. Not only was that it inefficient and a little hard to understand, it could potentially result in a bug if a command ever included a line that began with "$datetimestring | ".

A better solution is to keep each command selected as an individual argument throughout the entire pipeline by delineating them with nulls, which is thankfully supported by fzf and fish string utils. Additionally, I realized the logic of stripping out the timestamps could be elegantly integrated into the pipeline.

@PatrickF1 PatrickF1 merged commit d9c8568 into main Aug 8, 2022
@PatrickF1 PatrickF1 deleted the print0-split0 branch August 8, 2022 18:01
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.

1 participant