Module: Bashly::SettingsCompletions
- Included in:
- Settings
- Defined in:
- lib/bashly/concerns/settings_completions.rb
Constant Summary collapse
- COMPLETION_SHELLS =
%w[bash zsh].freeze
Instance Method Summary collapse
Instance Method Details
#completion_shells ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/bashly/concerns/settings_completions.rb', line 13 def completion_shells case completions when nil, false, 'minimal' then [] when 'full' then COMPLETION_SHELLS when String then validate_completion_shells completions else invalid_completions end end |
#completions ⇒ Object
5 6 7 |
# File 'lib/bashly/concerns/settings_completions.rb', line 5 def completions @completions ||= get :completions end |
#completions? ⇒ Boolean
9 10 11 |
# File 'lib/bashly/concerns/settings_completions.rb', line 9 def completions? completions == 'minimal' || completion_shells.any? end |