-
Notifications
You must be signed in to change notification settings - Fork 327
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
Add query
server command to expose internal state
#1384
Conversation
Thank you, I haven't had time to look at I only looked at the PR superficially1, but I'll once again make the point that, I think, Another reason I like pre-defining such commands is to pique users' curiosity: when they use I don't feel as strongly about That said, you have by now thought about this far deeper than I have, so I leave the final decision up to you. Thank you again for working through this mess of a problem! Footnotes
|
@ilyagr That's OK, I'm happy to wait a week or however long you want before merging this. I don't think this feature is urgent or anything. I guess I'm fine with providing |
Is this a base for how #1084 will be implemented, too? |
Should be possible, something like |
Seems intuitive enough to me. |
Perhaps we should rename |
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.
Sorry for taking so long (I guess I did warn you), and thank you for waiting. I had some minor questions, I don't think any of them are blocking.
The only thing I feel stronger about is that it'd be nice to rename recv
to something clearer (see my other comment), or at least discuss alternative names. recv
is OK, but once we merge it, we'll be stuck with it for a long time.
Thank you again for working on this!
recv
server command to expose internal statequery
server command to expose internal state
After some thinking I have decided to additionally provide a default command for
Regarding the jump list and the history, I do consider their usage to be more niche compared to displaying configurations like mappings/commands, so I will leave them out. |
Description
Based on discussion starting from #1310 (comment).
Support for querying the command history is added. This is an improvement over reading the history file as it includes commands from the current session as well as the persisted history from previous sessions.
In addition, I have decided to remove the existingmaps
/cmaps
/cmds
/jumps
commands, so that they are no longer provided by default. Instead these can be configured manually according to the user's preference.maps
,cmaps
andcmds
will remain provided by default for convenience and instructive purposes, butjumps
will be removed. This is a breaking change.Examples
Create
maps
command to display mappings:Display both
maps
andcmaps
in a single command:Use
awk
to add color:Select and execute a previous command:
Change location based on the jump list: