Skip to content

doc(styleguide): fix asciidoc format #673

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

Merged
merged 1 commit into from
Dec 27, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions doc/styleguide.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,22 @@ need that kind of processing (e.g. file and command names). The
_filedir and _filedir_xspec helpers do this automatically whenever
they return some completions.

[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
------------------------------------------------
`[[ ${COMPREPLY-} == *= ]] && compopt -o nospace`
-------------------------------------------------

The above is functionally a shorthand for:
----
if [[ ${#COMPREPLY[@]} -eq 1 && ${COMPREPLY[0]} == *= ]]; then
compopt -o nospace
fi
----

if [[ ${#COMPREPLY[@]} -eq 1 && ${COMPREPLY[0]} == *= ]]; then
compopt -o nospace
fi

It is used to ensure that long options' name won't get a space
appended after the equal sign. Calling compopt -o nospace makes sense
in case completion actually occurs: when only one completion is
available in COMPREPLY.

$split && return
----------------
`$split && return`
------------------

Should be used in completions using the -s flag of _init_completion,
or other similar cases where _split_longopt has been invoked, after
Expand Down