diff options
author | a-kenji <aks.kenji@protonmail.com> | 2021-11-11 17:13:34 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-11 17:13:34 +0100 |
commit | bd8c834d7cbf08049214e10c3bcd652226d0aa2d (patch) | |
tree | 265a983b5d1fd6402151d95657942c85ab906d9d /zellij-client/src | |
parent | 26bd80be2d666eba69712ddc448d32345b6e7222 (diff) |
fix(options): handling and overwriting cli opts (#859)
* fix(options): handling ond verwriting cli opts
* previously it was only possible to turn off certain features with a
command line option, now it is possible to also overwrite this
behavior in a sane way, for that some breaking changes happened:
following options got renamed and inverted:
```
disable_mouse_mode -> mouse_mode
no_pane_frames -> pane_frames
```
following cli options got added:
```
mouse-mode [bool]
pane-frames [bool]
simplified-ui [bool]
```
the following cli flag got removed:
```
simplified-ui
```
They can be specified in the following way:
```
zellij options --mouse-mode true
```
in order to enable the mouse mode, even if it is turned off in the
config file:
```
mouse_mode: false
```
The order is now as follows:
1. corresponding flag (`disable-mouse-mode`)
2. corresponding option (`mouse-mode`)
3. corresponding config option (`mouse_mode`)
* add: options and flags for the same value conflict
* example:
```
zellij options --mouse-mode true --disable-mouse-mode`
```
```
$ error: The argument '--mouse-mode <mouse-mode>' cannot be used with '--disable-mouse-mode'
```
Diffstat (limited to 'zellij-client/src')
-rw-r--r-- | zellij-client/src/input_handler.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/zellij-client/src/input_handler.rs b/zellij-client/src/input_handler.rs index 0f8a60ff2..3c2495c02 100644 --- a/zellij-client/src/input_handler.rs +++ b/zellij-client/src/input_handler.rs @@ -63,7 +63,7 @@ impl InputHandler { let mut err_ctx = OPENCALLS.with(|ctx| *ctx.borrow()); err_ctx.add_call(ContextType::StdinHandler); let alt_left_bracket = vec![27, 91]; - if !self.options.disable_mouse_mode.unwrap_or_default() { + if self.options.mouse_mode.unwrap_or(true) { self.os_input.enable_mouse(); } loop { |