Last active
June 23, 2023 20:44
-
-
Save jwir3/ed2eac850f62915473817ee7396ba13b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PATH_TO_YUBIKEY_PRESENT_SCRIPT=/some/path/to/yubikey-present.sh | |
function git() { | |
if [[ "$1" == "commit" && $(${PATH_TO_YUBIKEY_PRESENT_SCRIPT}) == "true" ]]; then | |
shift 1 | |
command git commit -S "$@" | |
else | |
command git "$@" | |
fi | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment