Open epsilon11101 opened 6 months ago
Hello! @epsilon11101 Based on your command, you could use the gitmoji tool to insert emojis in your commits without having to map them one by one. Here is an example:
customCommands:
- key: "c"
description: "commit with gitmoji"
context: "files"
loadingText: "opening gitmoji commit tool"
subprocess: true
command: |
staged_files=$(git diff --cached --name-only)
if [ -z "$staged_files" ]; then
echo "No files staged for commit. Please stage your changes first."
exit 1
else
gitmoji -c
fi
I've created a custom key, but it doesn't validate if there are staged changes. It executes even if there are no staged files. Any help would be appreciated.
Here's my custom command configuration: