From cf4c7260cfe4476d3b65d77f3b6132569b50e812 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Fri, 2 Aug 2024 15:52:15 -0400 Subject: [PATCH] Document `set working-directory` (#2288) --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index c1a95983..ec011da9 100644 --- a/README.md +++ b/README.md @@ -772,6 +772,23 @@ $ just foo /subdir ``` +You can override working directory with `set working-directory := '…'`, whose value +is relative to the default working directory. + +```just +set working-directory := 'bar' + +@foo: + pwd +``` + +```sh +$ pwd +/home/bob +$ just foo +/home/bob/bar +``` + ### Aliases Aliases allow recipes to be invoked on the command line with alternative names: