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-utils/src/setup.rs | |
| parent | chore(version): bump development version (diff) | |
| download | sl0ppij-bd8c834d7cbf08049214e10c3bcd652226d0aa2d.tar.gz sl0ppij-bd8c834d7cbf08049214e10c3bcd652226d0aa2d.tar.xz sl0ppij-bd8c834d7cbf08049214e10c3bcd652226d0aa2d.zip | |
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-utils/src/setup.rs')
| -rw-r--r-- | zellij-utils/src/setup.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/zellij-utils/src/setup.rs b/zellij-utils/src/setup.rs index 1ca596ff..fcd90d1c 100644 --- a/zellij-utils/src/setup.rs +++ b/zellij-utils/src/setup.rs @@ -270,7 +270,7 @@ impl Setup { // https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda let hyperlink_start = "\u{1b}]8;;"; let hyperlink_mid = "\u{1b}\\"; - let hyperlink_end = "\u{1b}]8;;\u{1b}\\\n'"; + let hyperlink_end = "\u{1b}]8;;\u{1b}\\"; let mut message = String::new(); @@ -315,7 +315,7 @@ impl Setup { message.push_str(&format!("[ARROW SEPARATOR]: {}\n", ARROW_SEPARATOR)); message.push_str(" Is the [ARROW_SEPARATOR] displayed correctly?\n"); - message.push_str(" If not you may want to either start zellij with a compatible mode 'zellij options --simplified-ui'\n"); + message.push_str(" If not you may want to either start zellij with a compatible mode: 'zellij options --simplified-ui true'\n"); let mut hyperlink_compat = String::new(); hyperlink_compat.push_str(hyperlink_start); hyperlink_compat.push_str("https://zellij.dev/documentation/compatibility.html#the-status-bar-fonts-dont-render-correctly"); @@ -326,6 +326,9 @@ impl Setup { " Or check the font that is in use:\n {}\n", hyperlink_compat )); + message.push_str("[MOUSE INTERACTION]: \n"); + message.push_str(" Can be temporarily disabled through pressing the [SHIFT] key.\n"); + message.push_str(" If that doesn't fix any issues consider to disable the mouse handling of zellij: 'zellij options --disable-mouse-mode'\n"); message.push_str(&format!("[FEATURES]: {:?}\n", FEATURES)); let mut hyperlink = String::new(); @@ -334,7 +337,7 @@ impl Setup { hyperlink.push_str(hyperlink_mid); hyperlink.push_str("zellij.dev/documentation"); hyperlink.push_str(hyperlink_end); - message.push_str(&format!("[DOCUMENTATION]: {}", hyperlink)); + message.push_str(&format!("[DOCUMENTATION]: {}\n", hyperlink)); //printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n' std::io::stdout().write_all(message.as_bytes())?; |
