diff options
| author | Shohei YOSHIDA <syohex@gmail.com> | 2022-12-03 17:21:48 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-03 17:21:48 +0900 |
| commit | f9373c96c727e1c8ef7fb48fe49524c1a786fa80 (patch) | |
| tree | efc5f4ed2fc2d1b1af3bc19c59e71b9b0f7161fe /src | |
| parent | Merge pull request #953 from zsh-users/update-setcap (diff) | |
| parent | Fix broken boolean parameter completion (diff) | |
| download | zsh-completions-f9373c96c727e1c8ef7fb48fe49524c1a786fa80.tar zsh-completions-f9373c96c727e1c8ef7fb48fe49524c1a786fa80.tar.gz zsh-completions-f9373c96c727e1c8ef7fb48fe49524c1a786fa80.tar.bz2 zsh-completions-f9373c96c727e1c8ef7fb48fe49524c1a786fa80.tar.lz zsh-completions-f9373c96c727e1c8ef7fb48fe49524c1a786fa80.tar.xz zsh-completions-f9373c96c727e1c8ef7fb48fe49524c1a786fa80.tar.zst zsh-completions-f9373c96c727e1c8ef7fb48fe49524c1a786fa80.zip | |
Merge pull request #956 from zsh-users/fix-broken-cmake-boolean-completion
Fix broken boolean parameter completion
Diffstat (limited to 'src')
| -rw-r--r-- | src/_cmake | 19 |
1 files changed, 11 insertions, 8 deletions
@@ -452,17 +452,17 @@ _cmake_define_property_values() { (CMAKE_CXX_STANDARD) _wanted cxx-standards expl 'cxx standard' _values 'cxx standard' ${_cmake_cxx_standards[@]} && ret=0;; (CMAKE_C_STANDARD) _wanted c-standards expl 'c standard' _values 'c standard' ${_cmake_c_standards[@]} && ret=0;; (CMAKE_TOOLCHAIN_FILE) _wanted toolchain-files expl 'file' _cmake_toolchain_files && ret=0;; - (CMAKE_COLOR_MAKEFILE) _wanted booleans expl 'boolean' ${_cmake_booleans[@]} && ret=0;; - (CMAKE_RULE_MESSAGES) _wanted booleans expl 'boolean' ${_cmake_booleans[@]} && ret=0;; - (CMAKE_VERBOSE_MAKEFILE) _wanted booleans expl 'boolean' ${_cmake_booleans[@]} && ret=0;; - (CMAKE_UNITY_BUILD) _wanted booleans expl 'boolean' ${_cmake_booleans[@]} && ret=0;; + (CMAKE_COLOR_MAKEFILE) _wanted booleans expl 'boolean' _cmake_booleans && ret=0;; + (CMAKE_RULE_MESSAGES) _wanted booleans expl 'boolean' _cmake_booleans && ret=0;; + (CMAKE_VERBOSE_MAKEFILE) _wanted booleans expl 'boolean' _cmake_booleans && ret=0;; + (CMAKE_UNITY_BUILD) _wanted booleans expl 'boolean' _cmake_booleans && ret=0;; (CMAKE_INSTALL_PREFIX) _files -/ && ret=0;; - (CMAKE_EXPORT_COMPILE_COMMANDS) _wanted booleans expl 'boolean' ${_cmake_booleans[@]} && ret=0;; + (CMAKE_EXPORT_COMPILE_COMMANDS) _wanted booleans expl 'boolean' _cmake_booleans && ret=0;; (CMAKE_*_COMPILER) _wanted compilers expl 'compiler' _cmake_compilers && ret=0;; (CMAKE_*_COMPILER_LAUNCHER) _wanted compilers expl 'compiler launcher' _cmake_launchers && ret=0;; (CMAKE_*_FLAGS(|_?*)) _message -e compiler-flags 'compiler flags' && _dispatch $service -value-,CPPFLAGS,-default- && ret=0;; - (CMAKE_*_STANDARD_REQUIRED) _wanted booleans expl 'boolean' ${_cmake_booleans[@]} && ret=0;; - (CMAKE_*_EXTENSIONS) _wanted booleans expl 'boolean' ${_cmake_booleans[@]} && ret=0;; + (CMAKE_*_STANDARD_REQUIRED) _wanted booleans expl 'boolean' _cmake_booleans && ret=0;; + (CMAKE_*_EXTENSIONS) _wanted booleans expl 'boolean' _cmake_booleans && ret=0;; (*) _files && ret=0;; esac @@ -487,7 +487,10 @@ _cmake_toolchain_files() { _files -g '*\.cmake*' } -local _cmake_booleans=(_describe -t booleans 'boolean' 'YES' 'NO') +(( $+functions[_cmake_booleans] )) || +_cmake_booleans() { + _values booleans 'YES' 'NO' +} # --------------- # _cmake_compilers |
