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

pkg/cli: Add histlist option to reverse listing #1838

Closed

Conversation

mpenick
Copy link
Contributor

@mpenick mpenick commented Sep 4, 2024

This provides a variable (edit:histlist:reverse) to reverse the listing, with more recent commands at the top, but leaves the default order as more recent at the bottom.

set edit:histlist:reverse = $true

Reversing (most to least recent commands) the histlist makes it easier to see more recent commands quickly without having to look near the bottom of the screen.

This provides a variable (`edit:histlist:reverse`) to reverse the
listing, with more recent commands at the top, but leaves the default
order as more recent at the bottom.

```
set edit:histlist:reverse = $true
```

Reversing (most to least recent commands) the histlist makes it easier
to see more recent commands quickly without having to look near the
bottom of the screen.
@krader1961
Copy link
Contributor

Does this have any implications for the &newest-first option of the edit:command-history command? Should there be an explicit mention that setting this to $true does not affect the default order of that command? And should the documentation for that command have at least a "see also" reference to this variable? Also, AFAICT, this doesn't document the new variable and it doesn't include any unit tests to verify the behavior introduced by this change.

@mpenick mpenick closed this Oct 7, 2024
@xiaq
Copy link
Member

xiaq commented Oct 9, 2024

Hi! Not sure about the exact reason you closed the PR, but this seems like a reasonable feature request.

I'm in the process of rewriting the Elvish TUI so I probably won't be accepting this PR as is (in particular, I'll probably implement a different API), but I filed #1847 to track this.

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.

3 participants