Skip to content

fix: get last row as username#70

Open
Reverier-Xu wants to merge 1 commit intoreitzig:mainfrom
Reverier-Xu:patch-1
Open

fix: get last row as username#70
Reverier-Xu wants to merge 1 commit intoreitzig:mainfrom
Reverier-Xu:patch-1

Conversation

@Reverier-Xu
Copy link
Copy Markdown

@Reverier-Xu Reverier-Xu commented Oct 11, 2025

This plugin throws an error in my environment:

test: Expected a combining operator like '-a' at index 2
User reverier != reverier
     ^
~/.config/fish/conf.d/sdk.fish (line 99):
if not set -q SDKMAN_CANDIDATES_DIR; or test (ls -ld "$SDKMAN_CANDIDATES_DIR" | awk '{print $3}') != (whoami)
                                        ^
from sourcing file ~/.config/fish/conf.d/sdk.fish
        called on line 189 of file ~/.config/fish/functions/fisher.fish

the ls -ld "$SDKMAN_CANDIDATES_DIR" | awk '{print $3}' actually returns two rows:

User
reverier # <- this is my username

so we should get the last row as proper username.


This error appears in my setup of eza (an alternative of gnu ls...), anyway it does not affect the final results.

@reitzig
Copy link
Copy Markdown
Owner

reitzig commented Oct 11, 2025

Hi, thanks for this workaround! May help other users of eza. 👍

Please note related #60, which is a special case of #23, just like your problem. I'll probably not merge any (situational) workarounds for individual aliases, pending a 'proper' fix for #23.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants