AndreasAugustin / go-gitmoji-cli

:octocat: A conventional gitmoji commit interactive command line tool for using emojis on conventional commits. :rocket:

Home Page:https://gitmoji.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: tab tab completion does not work

AndreasAugustin opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

Currently the generated completion contains invalid characters

~  go-gitmoji-cli completion zsh                  
____ ____    ____ _ ___ _  _ ____  _ _    ____ _    _
| __ |  | __ | __ |  |  |\/| |  |  | | __ |    |    |
|__] |__|    |__] |  |  |  | |__| _| |    |___ |___ |
#compdef go-gitmoji-cli
compdef _go-gitmoji-cli go-gitmoji-cli

# zsh completion for go-gitmoji-cli                       -*- shell-script -*-

__go-gitmoji-cli_debug()
{
    local file="$BASH_COMP_DEBUG_FILE"

The figlet is breaking the functionality

Expected Behavior

completions must work

Current Behavior

The generated completion does not work

Steps To Reproduce

~  go-gitmoji-cli completion zsh > /tmp/completion 
☁  ~  source /tmp/completion                           
/tmp/completion:1: bad pattern: ^[[35m____

Possible Solution

Currently the figlet is created within the root init() function.
Somehow when caling go-gitmoji-cli completion zsh the figlet must not be called

Additional Information/Context

No response

go-gitmoji-cli Version

v0.1.0-alpha