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

Error while editing a command prefix with "-" or "--" #1582

Closed
shootheart opened this issue Jan 17, 2024 · 1 comment
Closed

Error while editing a command prefix with "-" or "--" #1582

shootheart opened this issue Jan 17, 2024 · 1 comment

Comments

@shootheart
Copy link

For Example, when I edit a command which begin with such as "-h" or "--h", it pops up a error message as following:

error: unexpected argument '--h' found

  tip: a similar argument exists: '--help'

  Usage: atuin search --help <--cwd <CWD>|--exclude-cwd <EXCLUDE_CWD>|--exit <EXIT>|--exclude-exit <EXCLUDE_EXIT>|--before <BEFORE>|--after <AFTER>|--limit <LIMIT>|--offset <OFFSET>|--interactive|--filter-mode <FILTER_MODE>|--search-mode <SEARCH_MODE>|--shell-up-key-binding|--human|QUERY|--cmd-only|--delete|--delete-it-all|--reverse|--format <FORMAT>|--inline-height <INLINE_HEIGHT>>

  For more information, try '--help'.

I'm using atuin 17.2.1 on zsh.

@ellie
Copy link
Member

ellie commented Jan 17, 2024

Hey! This was fixed in #1511 and #1506, and will be released at the start of next month.

See: https://forum.atuin.sh/t/help-with-odd-atuin-thing-with-status/45/2?u=ellie

You can put this in your .zshrc after the Atuin init for now:

_zsh_autosuggest_strategy_atuin() {
    suggestion=$(atuin search --cmd-only --limit 1 --search-mode prefix -- "$1")
}

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

No branches or pull requests

2 participants