Skip to content

add shell plugin history#308

Open
exscientiafortis wants to merge 1 commit intoanyrun-org:masterfrom
exscientiafortis:shell-history
Open

add shell plugin history#308
exscientiafortis wants to merge 1 commit intoanyrun-org:masterfrom
exscientiafortis:shell-history

Conversation

@exscientiafortis
Copy link
Contributor

thanks for the wonderful project
I was missing this feature after migrating to anyrun so added it for my selfish self, but PRing in case you think it could be useful to others

  • saves the history up to a configurable limit in $XDG_STATE_DIR/anyrun, or in memory if that fails (i'm not 100% convinced that's useful enough to keep, may be better to just disable history entirely in that case. I can be persuaded either way :))

  • deduplicates on submit, only one entry for each distinct command

  • reusing an old command again makes it bubble up the history

  • the added dirs and indexmap dependencies are imo not problematic. on the fuzzy matcher am open to alternatives if there are better options

kept it simple, didn't put effort into parsing the shell grammars for supporting multiline and so on, deep rabbit hole there imo

appreciate feedback and happy to make changes

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