summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorKevin Song <chipbuster@users.noreply.github.com>2019-08-08 10:25:30 -0700
committerMatan Kushner <hello@matchai.me>2019-08-08 13:25:30 -0400
commit3daf3ddf26ab8f2860e2c961bbe8b8d691049d08 (patch)
tree298643e04407cefe19b41d57b57673f1a51ddf41 /docs
parentb2303d5d8e292a827d6c0294b6f76a505666df85 (diff)
feat: implement timer module (#118)
Implement a timer module that takes a commandline argument, the number of seconds the last job took to complete, and displays it if appropriate. Alters shell initialization files to compute this number using date +%s where needed. Adds a config section to configure minimum amount of time before timer is shown (default is 2s)
Diffstat (limited to 'docs')
-rw-r--r--docs/config/README.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/docs/config/README.md b/docs/config/README.md
index 2ed8bd7ec..772fa6b41 100644
--- a/docs/config/README.md
+++ b/docs/config/README.md
@@ -109,6 +109,33 @@ command had an unsuccessful status code (non-zero).
symbol = "❯"
```
+## Command Duration
+
+The `cmd_duration` module shows how long the last command took to execute.
+The module will be shown only if the command took longer than two seconds, or
+the `min_time` config value, if it exists.
+
+::: warning NOTE
+Command duration is currently not supported in `bash`. See
+[this issue](https://github.com/starship/starship/issues/124) for more details.
+:::
+
+### Options
+
+| Variable | Default | Description |
+| ---------- | ------- | ----------------------------------- |
+| `min_time` | `2` | Shortest duration to show time for. |
+| `disabled` | `false` | Disables the `cmd_duration` module. |
+
+### Example
+
+```toml
+# ~/.config/starship.toml
+
+[cmd_duration]
+min_time = 4
+```
+
## Directory
The `directory` module shows the path to your current directory, truncated to
@@ -366,3 +393,4 @@ The module will be shown if any of the following conditions are met:
[username]
disabled = true
```
+