From 6671f72d1be531cd2fc5786752c2b84ef8e760ae Mon Sep 17 00:00:00 2001 From: cyqsimon <28627918+cyqsimon@users.noreply.github.com> Date: Wed, 5 Apr 2023 16:32:26 +0800 Subject: Updated client config docs (#839) * Updated client config docs - Example `config.toml` now includes all the newest options - `settings.rs`, `config.toml`, and `config.md` now have uniform option order * Remove trailing space --- atuin-client/config.toml | 37 +++++++++++++++++++++++++++---------- atuin-client/src/settings.rs | 8 ++++---- 2 files changed, 31 insertions(+), 14 deletions(-) (limited to 'atuin-client') diff --git a/atuin-client/config.toml b/atuin-client/config.toml index a3c255b6..1208586e 100644 --- a/atuin-client/config.toml +++ b/atuin-client/config.toml @@ -10,7 +10,7 @@ # session_path = "~/.key" ## date format used, either "us" or "uk" -# dialect = "uk" +# dialect = "us" ## enable or disable automatic sync # auto_sync = true @@ -18,21 +18,38 @@ ## enable or disable automatic update checks # update_check = true -## how often to sync history. note that this is only triggered when a command -## is ran, so sync intervals may well be longer -## set it to 0 to sync after every command -# sync_frequency = "5m" - ## address of the sync server # sync_address = "https://api.atuin.sh" +## how often to sync history. note that this is only triggered when a command +## is ran, so sync intervals may well be longer +## set it to 0 to sync after every command +# sync_frequency = "1h" + ## which search mode to use -## possible values: prefix, fulltext, fuzzy -# search_mode = "prefix" +## possible values: prefix, fulltext, fuzzy, skim +# search_mode = "fuzzy" + +## which filter mode to use +## possible values: global, host, session, directory +# filter_mode = "global" + +## which filter mode to use when atuin is invoked from a shell up-key binding +## the accepted values are identical to those of "filter_mode" +## leave unspecified to use same mode set in "filter_mode" +# filter_mode_shell_up_keybinding = "global" ## which style to use ## possible values: auto, full, compact -#style = "auto" +# style = "auto" + +## the maximum number of lines the interface should take up +## set it to 0 to always go full screen +# inline_height = 0 + +## enable or disable showing a preview of the selected command +## useful when the command is longer than the terminal width and is cut off +# show_preview = false ## what to do when the escape key is pressed when searching ## possible values: return-original, return-query @@ -55,4 +72,4 @@ # history_filter = [ # "^secret-cmd", # "^innocuous-cmd .*--secret=.+" -# ] \ No newline at end of file +# ] diff --git a/atuin-client/src/settings.rs b/atuin-client/src/settings.rs index 756c4966..0a723fb2 100644 --- a/atuin-client/src/settings.rs +++ b/atuin-client/src/settings.rs @@ -327,22 +327,22 @@ impl Settings { .set_default("dialect", "us")? .set_default("auto_sync", true)? .set_default("update_check", true)? - .set_default("sync_frequency", "1h")? .set_default("sync_address", "https://api.atuin.sh")? + .set_default("sync_frequency", "1h")? .set_default("search_mode", "fuzzy")? .set_default("filter_mode", "global")? - .set_default("shell_up_key_binding", false)? + .set_default("style", "auto")? .set_default("inline_height", 0)? .set_default("show_preview", false)? .set_default("exit_mode", "return-original")? - .set_default("session_token", "")? - .set_default("style", "auto")? .set_default("word_jump_mode", "emacs")? .set_default( "word_chars", "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789", )? .set_default("scroll_context_lines", 1)? + .set_default("shell_up_key_binding", false)? + .set_default("session_token", "")? .add_source( Environment::with_prefix("atuin") .prefix_separator("_") -- cgit v1.3.1