Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Expand config state subcommand help documentation
Maximilian Roose4c2c8b90dc7
diff --git a/docs/content/config.md b/docs/content/config.mdindex 7b193152f..042679109 100644--- a/docs/content/config.md+++ b/docs/content/config.md@@ -541,8 +541,6 @@ With `--project`, creates `.config/wt.toml` in the current repository:# test = ".venv/bin/pytest"```-----### Command reference```@@ -614,7 +612,245 @@ Clear all stored state:wt config state clear```----+## wt config state default-branch++### Detection++Worktrunk detects the default branch automatically:++1. **Local cache** — Checks `git rev-parse origin/HEAD` (fast, no network)+2. **Remote query** — If not cached, queries `git ls-remote` (100ms–2s)+3. **Cache result** — Stores via `git remote set-head` for future calls+4. **Local inference** — If no remote, infers from local branches++The local inference fallback uses these heuristics in order:+- If only one local branch exists, uses it+- Checks what HEAD points to in main worktree+- Checks `git config init.defaultBranch`+- Looks for common names: main, master, develop++### When to use++Most users never need this command — default branch detection is automatic.+Use it to:++- **Debug** — See what worktrunk thinks the default branch is+- **Override** — Set a non-standard default branch with `set`+- **Refresh** — Force re-query with `get --refresh` after remote changes+- **Clear** — Remove cached value with `clear`++Without a subcommand, runs `get`. For `--refresh`, use `get --refresh`.++### Command reference++```+wt config state default-branch - Default branch setting++Usage: wt config state default-branch [OPTIONS] [COMMAND]++Commands:+ get Get the default branch+ set Set the default branch+ clear Clear the default branch cache++Options:+ -h, --help+ Print help (see a summary with '-h')++Global Options:+ -C <path>+ Working directory for this command++ --config <path>+ User config file path++ -v, --verbose+ Show commands and debug info+```+++## wt config state ci-status++Caches GitHub/GitLab CI status for display in [wt list](@/list.md#ci-status).++### How it works++1. **Platform detection** — Detected from remote URL (github.com → GitHub, gitlab.com → GitLab)+2. **CLI requirement** — Requires `gh` (GitHub) or `glab` (GitLab) CLI, authenticated+3. **What's checked** — PRs/MRs first, then branch pipelines for branches with upstream+4. **Caching** — Results cached 30-60 seconds per branch+commit++### Status values++| Status | Meaning |+|--------|---------|+| `passed` | All checks passed |+| `running` | Checks in progress |+| `failed` | Checks failed |+| `conflicts` | PR has merge conflicts |+| `noci` | No checks configured |++See [wt list CI status](@/list.md#ci-status) for display symbols and colors.++### When to use++- **Debug** — See cached status and when it was fetched+- **Refresh** — Force re-fetch with `get --refresh`+- **Clear** — Remove stale cache entries++Without a subcommand, runs `get` for the current branch. For `--branch` or `--refresh`, use `get --branch=NAME`.++### Command reference++```+wt config state ci-status - CI status cache++Usage: wt config state ci-status [OPTIONS] [COMMAND]++Commands:+ get Get CI status for a branch+ clear Clear CI status cache++Options:+ -h, --help+ Print help (see a summary with '-h')++Global Options:+ -C <path>+ Working directory for this command++ --config <path>+ User config file path++ -v, --verbose+ Show commands and debug info+```+++## wt config state marker++Custom status text or emoji shown in the `wt list` Status column.++### Display++Markers appear at the start of the Status column:++```+Branch Status Path+main ^ ~/code/myproject+feature 🚧↑ ~/code/myproject.feature+bugfix 🤖!↑⇡ ~/code/myproject.bugfix+```++### Use cases++- **Work status** — `🚧` WIP, `✅` ready for review, `🔥` urgent+- **Agent tracking** — The [Claude Code plugin](@/claude-code.md) sets markers automatically+- **Notes** — Any short text: `"blocked"`, `"needs tests"`++### Storage++Stored in git config as `worktrunk.marker.<branch>`. Set directly with:++```bash+git config worktrunk.marker.feature "🚧"+```++Without a subcommand, runs `get` for the current branch. For `--branch`, use `get --branch=NAME`.++### Command reference++```+wt config state marker - Branch markers++Usage: wt config state marker [OPTIONS] [COMMAND]++Commands:+ get Get marker for a branch+ set Set marker for a branch+ clear Clear marker for a branch++Options:+ -h, --help+ Print help (see a summary with '-h')++Global Options:+ -C <path>+ Working directory for this command++ --config <path>+ User config file path++ -v, --verbose+ Show commands and debug info+```+++## wt config state logs++View and manage logs from background operations.++### What's logged++| Operation | Log file |+|-----------|----------|+| post-start hooks | `{branch}-{source}-post-start-{name}.log` |+| Background removal | `{branch}-remove.log` |++Source is `user` or `project` depending on where the hook is defined.++### Location++All logs are stored in `.git/wt-logs/` (in the main worktree's git directory).++### Behavior++- **Overwrites** — Same operation on same branch overwrites previous log+- **Persists** — Logs from deleted branches remain until manually cleared+- **Shared** — All worktrees write to the same log directory++### Examples++List all log files:+```bash+wt config state logs get+```++View a specific log:+```bash+cat "$(git rev-parse --git-dir)/wt-logs/feature-project-post-start-build.log"+```++Clear all logs:+```bash+wt config state logs clear+```++### Command reference++```+wt config state logs - Background operation logs++Usage: wt config state logs [OPTIONS] [COMMAND]++Commands:+ get List background operation log files+ clear Clear background operation logs++Options:+ -h, --help+ Print help (see a summary with '-h')++Global Options:+ -C <path>+ Working directory for this command++ --config <path>+ User config file path++ -v, --verbose+ Show commands and debug info+```### Command reference@@ -647,8 +883,6 @@ Global Options:Show commands and debug info```-----## Command reference```diff --git a/docs/content/hook.md b/docs/content/hook.mdindex 4c33f4be8..ead44f847 100644--- a/docs/content/hook.md+++ b/docs/content/hook.md@@ -343,8 +343,6 @@ env = "cp {{ repo_root }}/.env.local .env"- [wt switch](@/switch.md) — Runs post-create/post-start hooks on `--create`- [wt config](@/config.md) — Manage hook approvals-----## Command reference```diff --git a/docs/content/list.md b/docs/content/list.mdindex 55572e32b..fabe7180d 100644--- a/docs/content/list.md+++ b/docs/content/list.md@@ -179,8 +179,6 @@ wt list --format=json | jq '.[] | select(.main_state == "integrated" or .main_st- [wt select](@/select.md) — Interactive worktree picker with live preview-----## Command reference```diff --git a/docs/content/merge.md b/docs/content/merge.mdindex 5e2c2af17..2c8b4cdce 100644--- a/docs/content/merge.md+++ b/docs/content/merge.md@@ -62,8 +62,6 @@ Use `--no-commit` to skip all git operations (steps 1-2) and only run hooks and- [wt remove](@/remove.md) — Remove worktrees without merging- [wt switch](@/switch.md) — Navigate to other worktrees-----## Command reference```diff --git a/docs/content/remove.md b/docs/content/remove.mdindex dd2e76f45..d3291b993 100644--- a/docs/content/remove.md+++ b/docs/content/remove.md@@ -63,8 +63,6 @@ Arguments resolve by path first, then branch name. [Shortcuts](@/switch.md#short- [wt merge](@/merge.md) — Remove worktree after merging- [wt list](@/list.md) — View all worktrees-----## Command reference```diff --git a/docs/content/select.md b/docs/content/select.mdindex 14112508d..24bc998e9 100644--- a/docs/content/select.md+++ b/docs/content/select.md@@ -49,8 +49,6 @@ Branches without worktrees are included — selecting one creates a worktree. (`- [wt list](@/list.md) — Static table view with all worktree metadata- [wt switch](@/switch.md) — Direct switching when you know the target branch-----## Command reference```diff --git a/docs/content/step.md b/docs/content/step.mdindex 29d65a238..b32c46cfa 100644--- a/docs/content/step.md+++ b/docs/content/step.md@@ -41,8 +41,6 @@ wt step push- [wt merge](@/merge.md) — Runs commit → squash → rebase → hooks → push → cleanup automatically- [wt hook](@/hook.md) — Run hooks independently-----## Command reference```diff --git a/docs/content/switch.md b/docs/content/switch.mdindex f5a73d295..385e2d835 100644--- a/docs/content/switch.md+++ b/docs/content/switch.md@@ -62,8 +62,6 @@ wt switch --create fix --base=@ # Branch from current HEAD- [wt remove](@/remove.md) — Delete worktrees when done- [wt merge](@/merge.md) — Integrate changes back to main-----## Command reference```diff --git a/src/cli.rs b/src/cli.rsindex 8ae827e07..535f0557e 100644--- a/src/cli.rs+++ b/src/cli.rs@@ -431,7 +431,15 @@ wt config state getClear all stored state:```consolewt config state clear-```"#+```++<!-- subdoc: default-branch -->++<!-- subdoc: ci-status -->++<!-- subdoc: marker -->++<!-- subdoc: logs -->"#)]State {#[command(subcommand)]@@ -444,7 +452,32 @@ pub enum StateCommand {/// Default branch setting#[command(name = "default-branch",- after_long_help = "Without a subcommand, runs `get`. For `--refresh`, use `get --refresh`."+ after_long_help = r#"## Detection++Worktrunk detects the default branch automatically:++1. **Local cache** — Checks `git rev-parse origin/HEAD` (fast, no network)+2. **Remote query** — If not cached, queries `git ls-remote` (100ms–2s)+3. **Cache result** — Stores via `git remote set-head` for future calls+4. **Local inference** — If no remote, infers from local branches++The local inference fallback uses these heuristics in order:+- If only one local branch exists, uses it+- Checks what HEAD points to in main worktree+- Checks `git config init.defaultBranch`+- Looks for common names: main, master, develop++## When to use++Most users never need this command — default branch detection is automatic.+Use it to:++- **Debug** — See what worktrunk thinks the default branch is+- **Override** — Set a non-standard default branch with `set`+- **Refresh** — Force re-query with `get --refresh` after remote changes+- **Clear** — Remove cached value with `clear`++Without a subcommand, runs `get`. For `--refresh`, use `get --refresh`."#)]DefaultBranch {#[command(subcommand)]@@ -452,7 +485,25 @@ pub enum StateCommand {},/// Previous branch (for `wt switch -`)- #[command(name = "previous-branch")]+ #[command(+ name = "previous-branch",+ after_long_help = r#"Enables `wt switch -` to return to the previous worktree, similar to `cd -` or `git checkout -`.++## How it works++Updated automatically on every `wt switch`. Stored in git config as `worktrunk.history`.++## When to use++Most users never need this command — the previous branch updates automatically.+Use it to:++- **Debug** — See what `-` resolves to+- **Override** — Set a specific branch as "previous"+- **Clear** — Reset the history++Without a subcommand, runs `get`."#+ )]PreviousBranch {#[command(subcommand)]action: Option<PreviousBranchAction>,@@ -461,7 +512,34 @@ pub enum StateCommand {/// CI status cache#[command(name = "ci-status",- after_long_help = "Without a subcommand, runs `get` for the current branch. For `--branch` or `--refresh`, use `get --branch=NAME`."+ after_long_help = r#"Caches GitHub/GitLab CI status for display in [wt list](@/list.md#ci-status).++## How it works++1. **Platform detection** — Detected from remote URL (github.com → GitHub, gitlab.com → GitLab)+2. **CLI requirement** — Requires `gh` (GitHub) or `glab` (GitLab) CLI, authenticated+3. **What's checked** — PRs/MRs first, then branch pipelines for branches with upstream+4. **Caching** — Results cached 30-60 seconds per branch+commit++## Status values++| Status | Meaning |+|--------|---------|+| `passed` | All checks passed |+| `running` | Checks in progress |+| `failed` | Checks failed |+| `conflicts` | PR has merge conflicts |+| `noci` | No checks configured |++See [wt list CI status](@/list.md#ci-status) for display symbols and colors.++## When to use++- **Debug** — See cached status and when it was fetched+- **Refresh** — Force re-fetch with `get --refresh`+- **Clear** — Remove stale cache entries++Without a subcommand, runs `get` for the current branch. For `--branch` or `--refresh`, use `get --branch=NAME`."#)]CiStatus {#[command(subcommand)]@@ -470,7 +548,34 @@ pub enum StateCommand {/// Branch markers#[command(- after_long_help = "Without a subcommand, runs `get` for the current branch. For `--branch`, use `get --branch=NAME`."+ after_long_help = r#"Custom status text or emoji shown in the `wt list` Status column.++## Display++Markers appear at the start of the Status column:++```+Branch Status Path+main ^ ~/code/myproject+feature 🚧↑ ~/code/myproject.feature+bugfix 🤖!↑⇡ ~/code/myproject.bugfix+```++## Use cases++- **Work status** — `🚧` WIP, `✅` ready for review, `🔥` urgent+- **Agent tracking** — The [Claude Code plugin](@/claude-code.md) sets markers automatically+- **Notes** — Any short text: `"blocked"`, `"needs tests"`++## Storage++Stored in git config as `worktrunk.marker.<branch>`. Set directly with:++```console+git config worktrunk.marker.feature "🚧"+```++Without a subcommand, runs `get` for the current branch. For `--branch`, use `get --branch=NAME`."#)]Marker {#[command(subcommand)]@@ -478,6 +583,43 @@ pub enum StateCommand {},/// Background operation logs+ #[command(after_long_help = r#"View and manage logs from background operations.++## What's logged++| Operation | Log file |+|-----------|----------|+| post-start hooks | `{branch}-{source}-post-start-{name}.log` |+| Background removal | `{branch}-remove.log` |++Source is `user` or `project` depending on where the hook is defined.++## Location++All logs are stored in `.git/wt-logs/` (in the main worktree's git directory).++## Behavior++- **Overwrites** — Same operation on same branch overwrites previous log+- **Persists** — Logs from deleted branches remain until manually cleared+- **Shared** — All worktrees write to the same log directory++## Examples++List all log files:+```console+wt config state logs get+```++View a specific log:+```console+cat "$(git rev-parse --git-dir)/wt-logs/feature-project-post-start-build.log"+```++Clear all logs:+```console+wt config state logs clear+```"#)]Logs {#[command(subcommand)]action: Option<LogsAction>,diff --git a/src/main.rs b/src/main.rsindex 349c72e89..13a0359e0 100644--- a/src/main.rs+++ b/src/main.rs@@ -301,8 +301,6 @@ fn handle_help_page(args: &[String]) {println!();println!("{}", after_help.trim());println!();- println!("---");- println!();println!("## Command reference");println!();println!("```");@@ -418,16 +416,26 @@ fn format_subcommand_section(let full_command = format!("{} {}", parent_name, subcommand_name);// Get the after_long_help content (conceptual docs)- // Increase heading levels since this will be nested under an H2+ // First increase heading levels for the direct content, THEN expand subdocs.+ // This way subdocs stay at their written level (##) instead of being bumped up.let after_help = sub.get_after_long_help().map(|s| {let text = s.to_string().replace("```console\n", "```bash\n");let text = increase_heading_levels(&text);+ let text = expand_subdoc_placeholders(&text, sub, &full_command);colorize_ci_status_for_html(&text)}).unwrap_or_default();+ // Format the section+ let mut section = format!("## {}\n\n", full_command);++ if !after_help.is_empty() {+ section.push_str(after_help.trim());+ section.push_str("\n\n");+ }+// Build command path from parent_name: "wt config" -> ["config", "create"]let command_path: Vec<&str> = parent_name.strip_prefix("wt ")@@ -438,14 +446,6 @@ fn format_subcommand_section(let reference_block = get_help_reference(&command_path);- // Format the section- let mut section = format!("## {}\n\n", full_command);-- if !after_help.is_empty() {- section.push_str(after_help.trim());- section.push_str("\n\n---\n\n");- }-section.push_str("### Command reference\n\n```\n");section.push_str(reference_block.trim());section.push_str("\n```\n");diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_ci_status.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_ci_status.snapindex c5ac658b1..1f2a60650 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_state_ci_status.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_ci_status.snap@@ -41,4 +41,31 @@ Usage: [1m[36mwt config state ci-status[0m [36m[OPTIONS][0m [36m[COMMAND][1m[36m-v[0m, [1m[36m--verboseShow commands and debug info+Caches GitHub/GitLab CI status for display in wt list.++[32mHow it works++1. [1mPlatform detection[0m — Detected from remote URL (github.com → GitHub, gitlab.com → GitLab)+2. [1mCLI requirement[0m — Requires [2mgh[0m (GitHub) or [2mglab[0m (GitLab) CLI, authenticated+3. [1mWhat's checked[0m — PRs/MRs first, then branch pipelines for branches with upstream+4. [1mCaching[0m — Results cached 30-60 seconds per branch+commit++[32mStatus values++ Status Meaning+ ───────── ──────────────────────+ [2mpassed[0m All checks passed+ [2mrunning[0m Checks in progress+ [2mfailed[0m Checks failed+ [2mconflicts[0m PR has merge conflicts+ [2mnoci[0m No checks configured++See wt list CI status for display symbols and colors.++[32mWhen to use++- [1mDebug[0m — See cached status and when it was fetched+- [1mRefresh[0m — Force re-fetch with [2mget --refresh+- [1mClear[0m — Remove stale cache entries+Without a subcommand, runs [2mget[0m for the current branch. For [2m--branch[0m or [2m--refresh[0m, use [2mget --branch=NAME[0m.diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_default_branch.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_default_branch.snapindex b579356fa..75b5851fb 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_state_default_branch.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_default_branch.snap@@ -42,4 +42,29 @@ Usage: [1m[36mwt config state default-branch[0m [36m[OPTIONS][0m [36m[COMM[1m[36m-v[0m, [1m[36m--verboseShow commands and debug info+[32mDetection++Worktrunk detects the default branch automatically:++1. [1mLocal cache[0m — Checks [2mgit rev-parse origin/HEAD[0m (fast, no network)+2. [1mRemote query[0m — If not cached, queries [2mgit ls-remote[0m (100ms–2s)+3. [1mCache result[0m — Stores via [2mgit remote set-head[0m for future calls+4. [1mLocal inference[0m — If no remote, infers from local branches++The local inference fallback uses these heuristics in order:+- If only one local branch exists, uses it+- Checks what HEAD points to in main worktree+- Checks [2mgit config init.defaultBranch+- Looks for common names: main, master, develop++[32mWhen to use++Most users never need this command — default branch detection is automatic.+Use it to:++- [1mDebug[0m — See what worktrunk thinks the default branch is+- [1mOverride[0m — Set a non-standard default branch with [2mset+- [1mRefresh[0m — Force re-query with [2mget --refresh[0m after remote changes+- [1mClear[0m — Remove cached value with [2mclear+Without a subcommand, runs [2mget[0m. For [2m--refresh[0m, use [2mget --refresh[0m.diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snapindex ba07e47f6..a3badb078 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_logs.snap@@ -28,9 +28,47 @@ Usage: [1m[36mwt config state logs[0m [36m[OPTIONS][0m [36m[COMMAND][1m[36mclear[0m Clear background operation logs[1m[32mOptions:- [1m[36m-h[0m, [1m[36m--help[0m Print help+ [1m[36m-h[0m, [1m[36m--help+ Print help (see a summary with '-h')[1m[32mGlobal Options:- [1m[36m-C[0m[36m [0m[36m<path>[0m Working directory for this command- [1m[36m--config[0m[36m [0m[36m<path>[0m User config file path- [1m[36m-v[0m, [1m[36m--verbose[0m Show commands and debug info+ [1m[36m-C[0m[36m [0m[36m<path>+ Working directory for this command++ [1m[36m--config[0m[36m [0m[36m<path>+ User config file path++ [1m[36m-v[0m, [1m[36m--verbose+ Show commands and debug info++View and manage logs from background operations.++[32mWhat's logged++ Operation Log file+ ────────────────── ───────────────────────────────────────+ post-start hooks [2m{branch}-{source}-post-start-{name}.log+ Background removal [2m{branch}-remove.log[0m++Source is [2muser[0m or [2mproject[0m depending on where the hook is defined.++[32mLocation++All logs are stored in [2m.git/wt-logs/[0m (in the main worktree's git directory).++[32mBehavior++- [1mOverwrites[0m — Same operation on same branch overwrites previous log+- [1mPersists[0m — Logs from deleted branches remain until manually cleared+- [1mShared[0m — All worktrees write to the same log directory++[32mExamples++List all log files:+ [2mwt config state logs get++View a specific log:+ [2mcat "$(git rev-parse --git-dir)/wt-logs/feature-project-post-start-build.log"++Clear all logs:+ [2mwt config state logs cleardiff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_marker.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_marker.snapindex 8d93ae687..8f5647e04 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_state_marker.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_marker.snap@@ -42,4 +42,27 @@ Usage: [1m[36mwt config state marker[0m [36m[OPTIONS][0m [36m[COMMAND][1m[36m-v[0m, [1m[36m--verboseShow commands and debug info+Custom status text or emoji shown in the [2mwt list[0m Status column.++[32mDisplay++Markers appear at the start of the Status column:++ [2mBranch Status Path+ [2mmain ^ ~/code/myproject+ [2mfeature 🚧↑ ~/code/myproject.feature+ [2mbugfix 🤖!↑⇡ ~/code/myproject.bugfix++[32mUse cases++- [1mWork status[0m — [2m🚧[0m WIP, [2m✅[0m ready for review, [2m🔥[0m urgent+- [1mAgent tracking[0m — The Claude Code plugin sets markers automatically+- [1mNotes[0m — Any short text: [2m"blocked"[0m, [2m"needs tests"++[32mStorage++Stored in git config as [2mworktrunk.marker.<branch>[0m. Set directly with:++ [2mgit config worktrunk.marker.feature "🚧"+Without a subcommand, runs [2mget[0m for the current branch. For [2m--branch[0m, use [2mget --branch=NAME[0m.diff --git a/tests/snapshots/integration__integration_tests__help__help_config_state_previous_branch.snap b/tests/snapshots/integration__integration_tests__help__help_config_state_previous_branch.snapindex 27d760a31..49f25f82a 100644--- a/tests/snapshots/integration__integration_tests__help__help_config_state_previous_branch.snap+++ b/tests/snapshots/integration__integration_tests__help__help_config_state_previous_branch.snap@@ -29,9 +29,32 @@ Usage: [1m[36mwt config state previous-branch[0m [36m[OPTIONS][0m [36m[COM[1m[36mclear[0m Clear the previous branch[1m[32mOptions:- [1m[36m-h[0m, [1m[36m--help[0m Print help+ [1m[36m-h[0m, [1m[36m--help+ Print help (see a summary with '-h')[1m[32mGlobal Options:- [1m[36m-C[0m[36m [0m[36m<path>[0m Working directory for this command- [1m[36m--config[0m[36m [0m[36m<path>[0m User config file path- [1m[36m-v[0m, [1m[36m--verbose[0m Show commands and debug info+ [1m[36m-C[0m[36m [0m[36m<path>+ Working directory for this command++ [1m[36m--config[0m[36m [0m[36m<path>+ User config file path++ [1m[36m-v[0m, [1m[36m--verbose+ Show commands and debug info++Enables [2mwt switch -[0m to return to the previous worktree, similar to [2mcd -[0m or [2mgit checkout -[0m.++[32mHow it works++Updated automatically on every [2mwt switch[0m. Stored in git config as [2mworktrunk.history[0m.++[32mWhen to use++Most users never need this command — the previous branch updates automatically.+Use it to:++- [1mDebug[0m — See what [2m-[0m resolves to+- [1mOverride[0m — Set a specific branch as "previous"+- [1mClear[0m — Reset the history++Without a subcommand, runs [2mget[0m.