all repos — scriptura @ 3bc3dd964a6f4d190040fccefbd9b0e85d1af0d5

a corner in $HOME for your scripts

read remaining args to `--new --` as script content

Alan Pearce
commit

3bc3dd964a6f4d190040fccefbd9b0e85d1af0d5

parent

2ad533210f375712ba2e16104c2bf49b9096e9e0

1 file changed, 8 insertions(+), 0 deletions(-)

changed files
M tests/scriptura.fishtests/scriptura.fish
@@ -91,6 +91,14 @@ touch "$test_root/existing_script"
scriptura --new existing_script 2>&1 | string match --regex "already exists" ) +# Test: --new with -- creates script with remaining arguments +@test "--new with -- creates script with remaining arguments" ( + set --global --export SCRIPTURA_ROOT $test_root + scriptura --new new_script -- echo foo + path is --type file --perm exec "$test_root/new_script" + tail -n 1 "$test_root/new_script" +) = "echo foo" + # Test: --which shows path for executable script @test "--which shows path for executable script" ( set --global --export SCRIPTURA_ROOT $test_root