diff options
author | Kevin Song <chipbuster@users.noreply.github.com> | 2019-08-13 19:49:47 -0700 |
---|---|---|
committer | Matan Kushner <hello@matchai.me> | 2019-08-13 22:49:47 -0400 |
commit | 22c8c3459f9583cd23098d76736f8af0fbbbeab3 (patch) | |
tree | bebdb1aa092806a36fad03d93f18f65bcc87e0c1 /docs | |
parent | 56f4797a2583dfe4a15fea9790b8c4cb0f5883f9 (diff) |
feat: implement `cmd_duration` for bash (#144)
Diffstat (limited to 'docs')
-rw-r--r-- | docs/config/README.md | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/docs/config/README.md b/docs/config/README.md index 0c92e9361..e3d759fff 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -119,11 +119,16 @@ 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. +::: warning Do Not Hook the DEBUG trap in Bash +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running +`eval $(starship init $0)`, or this module **will** break. ::: +Bash users who need preexec-like functionality can use +[rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). +Simply define the arrays `preexec_functions` and `precmd_functions` before +running `eval $(starship init $0)`, and then proceed as normal. + ### Options | Variable | Default | Description | |