Shell – Executables show with character * next to their name in output of ls

lsshellzsh

I noticed that when I list my executables with ls on my Z shell they show up with a character * next to their name (e.g. see the file in red .test_color_scheme)

    enter image description here

What is causing this? I understand the colors are controlled by by LS_COLORS? But is LS_COLORS also responsible for showing * next to their name? or is there anything else that causes this?

Note:
I verified this happens to all my executable files, and that the character * is not part of the file name (e.g. to open the file I type cat filename without the * character)

Best Answer

This is caused by the -F/--classify flag on ls (as are the / after directories, though those can be added independently). It seems this option is aliased into your ls. If you would like to disable it, you should track down where it is added as an alias and remove it, or add --indicator-style=none.

The following options affect these indicators:

-F, --classify
    append indicator (one of */=>@|) to entries

--file-type
    likewise, except do not append `*'

-p, --indicator-style=slash
    append / indicator to directories

--indicator-style=WORD
    append indicator with style WORD to entry names: none (default),
    slash (-p), file-type (--file-type), classify (-F)