mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Added meaningful page for apparently broken content
23
SC2023.md
23
SC2023.md
@@ -1 +1,22 @@
|
|||||||
The shell may override 'time' as seen in man time(1). Use 'command time ..' for that one.
|
## The shell may override `time` as seen in man time(1). Use `command time ..` for that one.
|
||||||
|
|
||||||
|
### Problematic code:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
time -some some
|
||||||
|
```
|
||||||
|
|
||||||
|
### Correct code:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
command time -some some
|
||||||
|
```
|
||||||
|
|
||||||
|
### Rationale:
|
||||||
|
|
||||||
|
`time` is a built-in command.
|
||||||
|
If you would like to use `time` from `$PATH`, you need to use `command` to execute it as a regular command.
|
||||||
|
|
||||||
|
### Exceptions:
|
||||||
|
|
||||||
|
None
|
Reference in New Issue
Block a user