mirror of
https://github.com/starship/starship.git
synced 2026-06-22 02:02:12 +07:00
feat: implement cmd_duration for bash (#144)
This commit is contained in:
committed by
Matan Kushner
parent
56f4797a25
commit
22c8c3459f
@@ -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 |
|
||||
|
||||
Reference in New Issue
Block a user