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

Command history additional alternative to sync_on_enter #806

Open
ejerke opened this issue Jul 14, 2024 · 3 comments
Open

Command history additional alternative to sync_on_enter #806

ejerke opened this issue Jul 14, 2024 · 3 comments
Labels
A-History Area: History management enhancement New feature or request

Comments

@ejerke
Copy link

ejerke commented Jul 14, 2024

Let us know about features you really want to see in reedline.

I want sync_on_enter, except that it would always still suggest the last run command in that terminal tab/window first. And only after that would it give the synced commands from other terminal tabs and windows.

References

Seems to be implemented in zsh, as it is only configured in omz.
The way I'm reading that is that zsh only has that one option (read sync_on_enter) but it works a bit differently. As sync_on_enter, after it has synced, will just give the last command from history, not last command in that tab first.

@ejerke ejerke added the enhancement New feature or request label Jul 14, 2024
@sholderbach
Copy link
Member

We can provide this functionality in Nushell for the SqliteBackedHistory if I understand your request correctly. We do it based on the current working directory but could extend this for session ids as well. With the text backed history we can not provide as many convenience features without a breaking change to the representation (purely session based could in theory be made by changing the syncing logic even further, but then the question becomes how much worse can we make the API shared between text based and sqlite. There is already the yearning for a better interface.)

@sholderbach sholderbach added the A-History Area: History management label Jul 16, 2024
@ejerke
Copy link
Author

ejerke commented Jul 17, 2024

Hmm I see, sounds like a tough nut to crack..

@sholderbach
Copy link
Member

For SqliteBackedHistory probably not so much :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-History Area: History management enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants