Document working directory (#2053)

This commit is contained in:
Casey Rodarmor 2024-05-18 15:09:24 -07:00 committed by GitHub
parent 7359deeb99
commit f3eebb74d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -755,6 +755,31 @@ $ just --list --list-heading ''
build
```
### Working Directory
By default, recipes run with the working directory set to the directory that
contains the `justfile`.
The `[no-cd]` attribute can be used to make recipes run with the working
directory set to directory in which `just` was invoked.
```just
@foo:
pwd
[no-cd]
@bar:
pwd
```
```sh
$ cd subdir
$ just foo
/
: just bar
/subdir
```
### Aliases
Aliases allow recipes to be invoked on the command line with alternative names: