diff --git a/Completions/_autocomplete__history_lines b/Completions/_autocomplete__history_lines index c037882..112d5c5 100644 --- a/Completions/_autocomplete__history_lines +++ b/Completions/_autocomplete__history_lines @@ -133,10 +133,9 @@ _autocomplete__history_lines() { fi local -Pa suf=( -S '' ) - if [[ $WIDGETSTYLE == *-select* && $#matches[@] > 1 ]]; then - # Enable multi-select. + zstyle -t ":autocomplete:$curcontext" append-semicolon; [[ $? != 1 ]] && + [[ $WIDGETSTYLE == *-select* && $#matches[@] > 1 ]] && suf=( -S ';' -R _autocomplete__history_lines_suffix ) - fi local tag=history-lines _comp_tags=" $tag" diff --git a/README.md b/README.md index 91d38f5..04384b6 100644 --- a/README.md +++ b/README.md @@ -339,6 +339,14 @@ a backend for it: } ``` +## Disable automatically added semicolons +Autocomplete adds a semicolon to each line to allow selecting another line afterwards. +The added semicolon get removed on most keystrokes besides . +You can deactivate this feature by setting `append-semicolon` to a non-true value: +```zsh +zstyle ':autocomplete:*' append-semicolon off +``` + ## Troubleshooting Try the steps in the [bug report template](.github/ISSUE_TEMPLATE/bug-report.md).