Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document working directory #2053

Merged
merged 1 commit into from
May 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -2797,7 +2822,7 @@ import? 'foo/bar.just'

Missing source files for optional imports do not produce an error.

### Modules<sup>1.19.0</sup>
### Modules <sup>1.19.0</sup>

A `justfile` can declare modules using `mod` statements. `mod` statements are
currently unstable, so you'll need to use the `--unstable` flag, or set the
Expand Down