Add gitmoji-fuzzy-hook as a submodule

This commit is contained in:
punkfairie 2024-02-10 11:21:36 -08:00
parent f768faed0d
commit 1911c1a7c1
No known key found for this signature in database
GPG key ID: 0858B0F48128A755
4 changed files with 11 additions and 15 deletions

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "git/gitmoji-fuzzy-hook"]
path = git/gitmoji-fuzzy-hook
url = https://gitlab.com/raabf/gitmoji-fuzzy-hook

@ -0,0 +1 @@
Subproject commit 36b2402500231a6d69b849e31d5667983f2effb0

View file

@ -17,8 +17,8 @@
## Dependencies: gitmoji-fuzzy-hook
###############################################################################
[ -t 1 ] # checks if this script is called from a terminal
emoji="$(/Users/marley/.local/share/gitmoji-fuzzy-hook/bin/gitmoji-fuzzy-hook-exec.sh $? $@)"
[ -t 1 ] # checks if this script is called from a terminal
emoji="$(/Users/marley/dotfiles/git/gitmoji-fuzzy-hook/bin/gitmoji-fuzzy-hook-exec.sh $? $@)"
msg_file="$1"
msg="$(cat "$msg_file")"
@ -26,8 +26,7 @@ msg="$(cat "$msg_file")"
# Do here whatever you want with the commit message before prepending the emoji
# to it and writing the message to the commit file.
if [ ! -z "${emoji}" ]; then # surpress the space if there is no emoji
if [ ! -z "${emoji}" ]; then # surpress the space if there is no emoji
msg="${emoji} ${msg}"
fi
echo -e "$msg" > "$msg_file"
echo -e "$msg" >"$msg_file"

View file

@ -9,16 +9,9 @@ print_subtitle Git
brew_install "Github CLI" gh
if ! [ -e "$HOME/.local/share/gitmoji-fuzzy-hook/" ]
execute \
"git clone https://gitlab.com/raabf/gitmoji-fuzzy-hook.git ~/.local/share/gitmoji-fuzzy-hook && \
ln -f -s ~/.local/share/gitmoji-fuzzy-hook/bin/gitmoji-fuzzy-hook-init.sh $HOME/bin/gitmoji-fuzzy-hook-init" \
gitmoji-fuzzy-hook
else
execute \
"cd ~/.local/share/gitmoji-fuzzy-hook/ && git pull; cd $DOT" \
gitmoji-fuzzy-hook
end
execute \
"ln -f -s ~/dotfiles/git/gitmoji-fuzzy-hook/bin/gitmoji-fuzzy-hook-init.sh $HOME/bin/gitmoji-fuzzy-hook-init" \
gitmoji-fuzzy-hook
print_subtitle "Git GPG"