diff --git a/lib/git/aliases.sh b/lib/git/aliases.sh index 7bb04bb..2d6a6b8 100644 --- a/lib/git/aliases.sh +++ b/lib/git/aliases.sh @@ -117,11 +117,12 @@ if [ "$git_setup_aliases" = "yes" ]; then __git_alias "$git_restore_alias" 'git' 'restore' # Custom default format for git log - git_log_command="log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" - __git_alias "$git_log_alias" 'git' "$git_log_command" + git_log_command=('log' '--graph' "--pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'" + '--abbrev-commit') + __git_alias "$git_log_alias" 'git' "${git_log_command[@]}" # Same as the above, but displays all the branches and remotes - __git_alias "$git_log_all_alias" 'git' "$git_log_command" '--branches' '--remotes' + __git_alias "$git_log_all_alias" 'git' "${git_log_command[@]}" '--branches' '--remotes' # Standard commands __git_alias "$git_clone_alias" 'git' 'clone'