Commit a0239c3
authored
fix: enable
The way these definitions worked before, they did not handle quoted args
with spaces properly.
For example, if you had `/tmp/test-just/printlen.py` as:
```python
#!/usr/bin/env python3
import sys
print(len(sys.argv))
```
and your `justfile` was:
```
printlen *args:
/tmp/test-just/printlen.py {{args}}
```
Then:
```shell
$ just printlen foo bar
3
$ just printlen 'foo bar'
3
```
which is not what we want: `'foo bar'` should be treated as one
argument.
The fix is to use
[positional-arguments](https://github.com/casey/just/blob/515e806b5121a4696113ef15b5f0b12e69854570/README.md#L1131):
```
set positional-arguments
printlen *args:
/tmp/test-just/printlen.py "$@"
```set positional-arguments in justfile (openai#1169)1 parent bdfa95e commit a0239c3
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
1 | 3 | | |
2 | 4 | | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
7 | | - | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
11 | | - | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | | - | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
0 commit comments