asdf-java icon indicating copy to clipboard operation
asdf-java copied to clipboard

strange ansi characters when i try to install a Java version

Open zfogg opened this issue 5 years ago • 3 comments

Any guidance here? I can't find anything about this error when I search google or GitHub issues.

I'll attach some screenshots of my config.

image image

zfogg avatar Nov 01 '20 14:11 zfogg

I'm not seeing this behaviour.

The code on line 100 and 101 is (on november 1 2020):

    read -r -a dirs <<<"$(ls -d ./*/)"
    cd "${dirs[0]}" || return 1

My guess is that your ls output also contains other things, like coloring, which is picked up by the following up cd command. Perhaps it's saver to change this part to something like find . -type d -maxdepth 1 -not -name "."

-- Edit

Now I'm really confused why I'm not seeing this behaviour. The color I get when I use it (the $'\E[1m\E[36m') in an echo is exactly the same color I'm getting from my ls -d output.

afbeelding

delgurth avatar Apr 10 '21 21:04 delgurth

@zfogg can you check if you have the CLICOLOR_FORCE variable set?

 CLICOLOR_FORCE  Color sequences are normally disabled if the output isn't directed to a
                 terminal.  This can be overridden by setting this flag.  The TERM vari-
                 able still needs to reference a color capable terminal however otherwise
                 it is not possible to determine which color sequences to use.

Only when I set that variable I'm able to reproduce your situation.

delgurth avatar Apr 10 '21 22:04 delgurth

@zfogg can you check if you have the CLICOLOR_FORCE variable set?

 CLICOLOR_FORCE  Color sequences are normally disabled if the output isn't directed to a
                 terminal.  This can be overridden by setting this flag.  The TERM vari-
                 able still needs to reference a color capable terminal however otherwise
                 it is not possible to determine which color sequences to use.

Only when I set that variable I'm able to reproduce your situation.

interesting! i'll check shortly. i usually do have this variable set

zfogg avatar Apr 10 '21 22:04 zfogg