gitall.rs icon indicating copy to clipboard operation
gitall.rs copied to clipboard

Make the `command` positional arg options

Open mattmahn opened this issue 4 years ago • 0 comments

With the completion of #7, it has become evident that sometimes you may not want to provide an additional argument. For example, extracting the commands to run into a separate script file:

git checkout master
git pull
git checkout -b new-branch
sed -- -i 's/foo/bar/g' some_file.txt
git add .
git commit -F /tmp/my_commit_msg.txt  # or -m 'some message'
git push -u origin HEAD

then gitall -X "$(realpath my_custom_script.sh)" will complain that an argument has not been provided to my_custom_script.sh; even though it's not actually required. This particular instance could be resolved by providing a dummy argument, but that doesn't work with all -X executables.

mattmahn avatar Dec 13 '21 19:12 mattmahn