Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"ln=target" in LS_COLORS does not produce a zcolors entry for "ln" #23

Open
cjhardekopf opened this issue Jan 18, 2025 · 0 comments
Open
Labels
bug Something isn't working

Comments

@cjhardekopf
Copy link

cjhardekopf commented Jan 18, 2025

Describe the bug

If the LS_COLORS has "ln=target" then the resulting zcolors does not have an entry for "ln".

Steps To Reproduce

Just have "ln=target" in LS_COLORS and then look at zcolors after it is generated, it will not have any entry for "ln".

Expected behavior

According to the code, there should be a default entry for "ln" in zcolors.

Observed behavior

The resulting zcolors does not have an entry for "ln" at all, it is missing.

Environment:

  • OS: Manjaro
  • Terminal: kitty
  • Zsh version: 5.9
  • Repo version: 0003e45

Additional context

Fortunately, this is easy to fix (I tracked it down on my machine). In "functions/zcolors" there is an attempt to replace "ln=target" with a default value, but it is slightly wrong. On line 105 it says:

for col in ${ls_colors[@]:/ln=target/$ls_defaults[ln]}; do

it should say:

for col in ${ls_colors[@]:/ln=target/ln=$ls_defaults[ln]}; do

i.e. The code is currently replacing the string "ln=target" with a value when it should be replacing it with "ln=value".

@cjhardekopf cjhardekopf added the bug Something isn't working label Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant