leetcode-submission.sh (406B)
1 #!/bin/bash 2 3 # you could try using open instead of vim, but depending on the filetype 4 # you may run into issues. 5 6 output=$(python3 ~/bin/python-files/create-leetcode.py "$1" "$2") && \ 7 echo "$output" | xargs vim && \ 8 dirname=$(echo "$output" | cut -d'/' -f1) && \ 9 formatted_name=$(echo "$dirname" | tr '-' ' ') && \ 10 python3 -m black . 11 git add . && \ 12 git commit -m "Completed $formatted_name" && \ 13 git push