snippetbashTip
compopt — Print or change the completion options for a command. `-o` means enabled and `+o` means disabled. Se
Viewed 0 times
thecommandoptionsclichangeprintcompoptcompletion
Problem
How to use the
compopt command: Print or change the completion options for a command. -o means enabled and +o means disabled. See also: compgen, complete. More information: <https://www.gnu.org/software/bash/manual/bash.html#index-compopt>.Solution
compopt — Print or change the completion options for a command. -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}}Print the options for the currently executing completion:
compoptEnable or disable a completion option of a command:
compopt {{-o|+o}} {{option1}} {{-o|+o}} {{option2}}Code Snippets
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}}Print the options for the currently executing completion
compoptEnable or disable a completion option of a command
compopt {{-o|+o}} {{option1}} {{-o|+o}} {{option2}}Context
tldr-pages: common/compopt
Revisions (0)
No revisions yet.