igalic / anicode

Unicode database query CLI
MIT License
29 stars 3 forks source link

anicode('s use of choices) fails on fish 2.5.0 #9

Closed igalic closed 7 years ago

igalic commented 7 years ago

i recently updated to fish 2.5.0, and since then this plugin doesn't work properly anymore:

 ~/s/m/core-plans    rebar3  cd                                                                                                    (1s 578ms)  
 ~  anicode frowning
function: Illegal function name '-S'
~/.config/fish/functions/choices.fish (line 47):   function -S __error_msg
    echo $error | sed "s:%(choices):$choices:"
                                                   ^
in function “choices”
        called on line 58 of file ~/.config/fish/functions/anicode.fish
        with parameter list “☹  WHITE FROWNING FACE 😦  FROWNING FACE WITH OPEN MOUTH 🙁        SLIGHTLY FROWNING FACE 🙍       PERSON FROWNING”

in command substitution
        called on line 56 of file ~/.config/fish/functions/anicode.fish

in function “anicode”
        called on standard input
        with parameter list “frowning”

function: Illegal function name '-S'
~/.config/fish/functions/choices.fish (line 51):   function -S __prompt
    set -l counter 1
                                                   ^
in function “choices”
        called on line 58 of file ~/.config/fish/functions/anicode.fish
        with parameter list “☹  WHITE FROWNING FACE 😦  FROWNING FACE WITH OPEN MOUTH 🙁        SLIGHTLY FROWNING FACE 🙍       PERSON FROWNING”

in command substitution
        called on line 56 of file ~/.config/fish/functions/anicode.fish

in function “anicode”
        called on standard input
        with parameter list “frowning”

__prompt: command not found
~/.config/fish/functions/choices.fish (line 1): __prompt
                                                ^
in command substitution
        called on line 0 of file ~/.config/fish/functions/choices.fish

in function “choices”
        called on line 58 of file ~/.config/fish/functions/anicode.fish
        with parameter list “☹  WHITE FROWNING FACE 😦  FROWNING FACE WITH OPEN MOUTH 🙁        SLIGHTLY FROWNING FACE 🙍       PERSON FROWNING”

in command substitution
        called on line 56 of file ~/.config/fish/functions/anicode.fish

in function “anicode”
        called on standard input
        with parameter list “frowning”

1
Selected ☹, pasted to your clipboard.
 ~ 
Markcial commented 7 years ago

I opened the issue on the choices library, thanks for the report.

EDIT: I added the tag wontfix to clarify that is not anicode related, but a bug from the choices library that has to check the fish version

Markcial commented 7 years ago

Already solved on choices repository https://github.com/fisherman/choices/issues/2#issuecomment-281043596