I have the following in a bash file:

prove --merge --normalize -v $1 -a test.tgz
vim -nR -c ':silent 0read ! tar xfO test.tgz $1' -c ':set nonumber' -c ':set syntax=test' -c ':silent !tmux select-pane -L'

The problem bit is the $1 in the second line. The script runs, but it displays the entire archive, not just the file I want: $1. If I hardcode the name of file into the script, it works as expected.

And my tar xfO test.tgz filename command works find on the command line.

How do I get this to work?

1 Answer 1


I put in double quotes and it's now working. I swear I tried that before though. Must have had a stray character or something in there before.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.