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
feat: capture from start of tmux pane history #28
Merged
andersevenrud
merged 13 commits into
andersevenrud:main
from
pbnj:feat/capture-from-start
Sep 2, 2023
Merged
feat: capture from start of tmux pane history #28
andersevenrud
merged 13 commits into
andersevenrud:main
from
pbnj:feat/capture-from-start
Sep 2, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment was marked as resolved.
This comment was marked as resolved.
Valid values: - `0`: start of visible pane (default value) - `-`: start of pane history See `:Man tmux` for details.
This comment was marked as outdated.
This comment was marked as outdated.
andersevenrud
requested changes
Sep 1, 2023
andersevenrud
requested changes
Sep 2, 2023
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
andersevenrud
approved these changes
Sep 2, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thanks for your contribution!
This comment was marked as outdated.
This comment was marked as outdated.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
By default,
tmux capture-pane
only captures what is visible on the pane. This means that any output that has scrolled off the pane is no longer being suggested bycmp-tmux
. For example, on a MBP Pro 13" with terminal font of Menlo and font size of 11, with 2 vertical panes in tmux, the maximum number of visible lines is~32 ±2
.My use-case:
aws iam list-policies | jq -rc .Policies[]
produces more than4,000
lines of output. I would like to be able to start typing an IAM Policy Name or IAM Policy ARN and havecmp
fuzzily suggest completions from the entire pane history (viatmux capture-pane -S-
).I have tested this change on my tmux
history-limit
of20000
and there were no noticeable performance issues.Screenshot
cmp
+cmp-tmux
suggestionscat /dev/random
exceeding 20,000 lines