franciscolourenco / done

A fish-shell package to automatically receive notifications when long processes finish.
MIT License
779 stars 71 forks source link

wslvar windir error #70

Closed Asheboy closed 4 years ago

Asheboy commented 4 years ago

Hi,

I'm getting the following error after a fisher add:

❯ sleep 7

wslvar: command not found
~/.config/fish/conf.d/done.fish (line 1): 
wslvar windir
^
in command substitution
        called on line 1 of file ~/.config/fish/conf.d/done.fish
in command substitution
        called on line 164 of file ~/.config/fish/conf.d/done.fish
in function '__done_ended'
in event handler: handler for generic event “fish_prompt”
~/.config/fish/conf.d/done.fish: Unknown error while evaluating command substitution
in command substitution
        called on line 164 of file ~/.config/fish/conf.d/done.fish
in function '__done_ended'
in event handler: handler for generic event “fish_prompt”
~/.config/fish/conf.d/done.fish: Unknown error while evaluating command substitution
in function '__done_ended'
in event handler: handler for generic event “fish_prompt”
ammgws commented 4 years ago

What's the output of uname -a? Are you using WSL? Is it WSL 1 or 2?

Asheboy commented 4 years ago

My uname -a is Linux asheboy-ThinkPad-T440s 4.15.0-76-generic #86-Ubuntu SMP Fri Jan 17 17:24:28 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux.

I honestly don't know what WSL is, apologies.

ammgws commented 4 years ago

WSL (Windows subsystem for Linux) is used on Windows. It seems like you're not using Windows, so need to figure out why done has entered into that WSL code block

Asheboy commented 4 years ago

I can confirm I am not using Windows.

I'm not sure that it is actually entering that block. I've replaced all the code in that block with an echo "abc" and I don't see that string when I run sleep 7. But I also don't get a notification!

Asheboy commented 4 years ago

Block looks like this:

            else if uname -a | string match --quiet --regex Microsoft; \
                echo (uname -a)
                echo "abcd"
ammgws commented 4 years ago

Do you have 'notify-send'? Still have to fix the issue of mistriggering the WSL block but wonder why it's falling through to there in the first place

Asheboy commented 4 years ago

I didn't! That's installed and working now. Thank you!

ammgws commented 4 years ago

No worries. I'll work on fixing the WSL detection.

franciscolourenco commented 4 years ago

@Asheboy thank you for reporting and @ammgws thank you for fixing! Feel free to reopen if the problem persists in v1.14.0.