mirror of
https://github.com/atuinsh/atuin.git
synced 2024-11-25 17:54:55 +01:00
Add option to completely disable help row (#993)
* Add option to completely disable help row * Pass full settings object to draw command * Add documentation for show_help
This commit is contained in:
parent
5b5e4eaa86
commit
d21b691bcf
@ -149,6 +149,7 @@ pub struct Settings {
|
||||
pub inline_height: u16,
|
||||
pub invert: bool,
|
||||
pub show_preview: bool,
|
||||
pub show_help: bool,
|
||||
pub exit_mode: ExitMode,
|
||||
pub word_jump_mode: WordJumpMode,
|
||||
pub word_chars: String,
|
||||
@ -337,6 +338,7 @@ impl Settings {
|
||||
.set_default("style", "auto")?
|
||||
.set_default("inline_height", 0)?
|
||||
.set_default("show_preview", false)?
|
||||
.set_default("show_help", true)?
|
||||
.set_default("invert", false)?
|
||||
.set_default("exit_mode", "return-original")?
|
||||
.set_default("word_jump_mode", "emacs")?
|
||||
|
@ -278,7 +278,7 @@ impl State {
|
||||
} else {
|
||||
1
|
||||
};
|
||||
let show_help = !compact || f.size().height > 1;
|
||||
let show_help = settings.show_help && (!compact || f.size().height > 1);
|
||||
let chunks = Layout::default()
|
||||
.direction(Direction::Vertical)
|
||||
.margin(0)
|
||||
|
@ -196,6 +196,12 @@ Configure whether or not to show a preview of the selected command.
|
||||
|
||||
Useful when the command is longer than the terminal width and is cut off.
|
||||
|
||||
### `show_help`
|
||||
|
||||
Configure whether or not to show the help row, which includes the current Atuin version (and whether an update is available), a keymap hint, and the total amount of commands in your history.
|
||||
|
||||
Defaults to `true`.
|
||||
|
||||
### `exit_mode`
|
||||
|
||||
What to do when the escape key is pressed when searching
|
||||
|
Loading…
Reference in New Issue
Block a user