2022-10-08 10:29:10 +05:30
|
|
|
# compopt
|
|
|
|
|
|
|
|
> Print or change the completion options for a command.
|
2025-08-16 10:51:18 +03:00
|
|
|
> `-o` means enabled and `+o` means disabled.
|
|
|
|
> See also: `compgen`, `complete`.
|
|
|
|
> More information: <https://www.gnu.org/software/bash/manual/bash.html#index-compopt>.
|
|
|
|
|
|
|
|
- Print the completion options for given command:
|
|
|
|
|
|
|
|
`compopt {{command}}`
|
|
|
|
|
|
|
|
- Enable or disable a completion option of a command:
|
|
|
|
|
|
|
|
`compopt {{-o|+o}} {{option1}} {{-o|+o}} {{option2}} {{command}}`
|
2022-10-08 10:29:10 +05:30
|
|
|
|
|
|
|
- Print the options for the currently executing completion:
|
|
|
|
|
|
|
|
`compopt`
|
|
|
|
|
2025-08-16 10:51:18 +03:00
|
|
|
- Enable or disable a completion option of a command:
|
2022-10-08 10:29:10 +05:30
|
|
|
|
2025-08-16 10:51:18 +03:00
|
|
|
`compopt {{-o|+o}} {{option1}} {{-o|+o}} {{option2}}`
|