deno icon indicating copy to clipboard operation
deno copied to clipboard

errors with auto completion

Open GiveMeFox opened this issue 1 year ago • 8 comments

Version: deno 2.0.0

steps to reproduce: curl -fsSL https://deno.land/install.sh | sh image

when having bash selected there's a warning image

but after restarting my console i get this error

~/.deno/env (line 4): “case” builtin not inside of switch block
case ":${PATH}:" in
^~~^
from sourcing file ~/.deno/env
	called on line 8 of file ~/.profile
from sourcing file ~/.profile
	called on line 23 of file ~/.config/fish/config.fish
from sourcing file ~/.config/fish/config.fish
	called during startup
.: Error while reading file '/home/givemefox/.deno/env'

this is the env file

#!/bin/sh
# deno shell setup; adapted from rustup
# affix colons on either side of $PATH to simplify matching
case ":${PATH}:" in
    *:"/home/givemefox/.deno/bin":*)
        ;;
    *)
        # Prepending path in case a system-installed deno executable needs to be overridden
        export PATH="/home/givemefox/.deno/bin:$PATH"
        ;;
esac

GiveMeFox avatar Oct 10 '24 17:10 GiveMeFox

Which shell are you running? Are you running fish by chance and installed the bash bindings? You can check which shell you are running with this command:

echo $0

marvinhagemeister avatar Oct 10 '24 19:10 marvinhagemeister

Which shell are you running? Are you running fish by chance and installed the bash bindings? You can check which shell you are running with this command:

echo $0

image

GiveMeFox avatar Oct 10 '24 20:10 GiveMeFox

Are you on macOS? So far everything points to the fish shell being used, which is not compatible with all syntaxes of bash. So having installed the bash completions are probably causing this.

marvinhagemeister avatar Oct 10 '24 20:10 marvinhagemeister

im using arch linux this command does work when i switch to bash tho

Are you on macOS? So far everything points to the fish shell being used, which is not compatible with all syntaxes of bash. So having installed the bash completions are probably causing this.

GiveMeFox avatar Oct 10 '24 20:10 GiveMeFox

Are you on macOS? So far everything points to the fish shell being used, which is not compatible with all syntaxes of bash. So having installed the bash completions are probably causing this.

and even when only checking the fish completions the same issue is still present

GiveMeFox avatar Oct 10 '24 20:10 GiveMeFox

and when i change the .profile line file from $HOME/.deno/env to env.fish it works

GiveMeFox avatar Oct 10 '24 20:10 GiveMeFox

just add the line to the fish config instead of the .profile file

GiveMeFox avatar Oct 10 '24 21:10 GiveMeFox

What does your config.fish look like? From the looks of it you may be sourcing .profile (which is written in sh/bash) from your config.fish.

nathanwhit avatar Oct 18 '24 08:10 nathanwhit

it seems to be working fine now!

GiveMeFox avatar Nov 14 '24 07:11 GiveMeFox