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

Not able to install tide using fisher #473

Open
MSSRPRAD opened this issue Dec 25, 2023 · 4 comments
Open

Not able to install tide using fisher #473

MSSRPRAD opened this issue Dec 25, 2023 · 4 comments
Labels
🐛 bug Something isn't working

Comments

@MSSRPRAD
Copy link

Describe the bug

Trying to install tide breaks fish terminal. To repair I have to delete ~/.config/fish.

mpradyumna@pop-os ~> curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functi
ons/fisher.fish | source && fisher install jorgebucaran/fisher
fisher install version 4.4.4
Fetching https://api.github.com/repos/jorgebucaran/fisher/tarball/HEAD
Installing jorgebucaran/fisher
           /home/mpradyumna/.config/fish/functions/fisher.fish
           /home/mpradyumna/.config/fish/completions/fisher.fish
Installed 1 plugin/s
mpradyumna@pop-os ~> fisher install IlanCosman/tide@v6
fisher install version 4.4.4
Fetching https://api.github.com/repos/ilancosman/tide/tarball/v6
Installing ilancosman/tide@v6
           /home/mpradyumna/.config/fish/functions/_tide_1_line_prompt.fish
           /home/mpradyumna/.config/fish/functions/_tide_2_line_prompt.fish
           /home/mpradyumna/.config/fish/functions/_tide_cache_variables.fish
           /home/mpradyumna/.config/fish/functions/_tide_detect_os.fish
           /home/mpradyumna/.config/fish/functions/_tide_find_and_remove.fish
           /home/mpradyumna/.config/fish/functions/_tide_fish_colorize.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_aws.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_character.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_cmd_duration.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_context.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_crystal.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_direnv.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_distrobox.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_docker.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_elixir.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_gcloud.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_git.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_go.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_java.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_jobs.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_kubectl.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_nix_shell.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_node.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_os.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_php.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_private_mode.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_pulumi.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_python.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_ruby.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_rustc.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_shlvl.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_status.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_terraform.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_time.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_toolbox.fish
           /home/mpradyumna/.config/fish/functions/_tide_item_vi_mode.fish
           /home/mpradyumna/.config/fish/functions/_tide_parent_dirs.fish
           /home/mpradyumna/.config/fish/functions/_tide_print_item.fish
           /home/mpradyumna/.config/fish/functions/_tide_pwd.fish
           /home/mpradyumna/.config/fish/functions/_tide_remove_unusable_items.fish
           /home/mpradyumna/.config/fish/functions/_tide_sub_bug-report.fish
           /home/mpradyumna/.config/fish/functions/_tide_sub_configure.fish
           /home/mpradyumna/.config/fish/functions/_tide_sub_reload.fish
           /home/mpradyumna/.config/fish/functions/fish_mode_prompt.fish
           /home/mpradyumna/.config/fish/functions/fish_prompt.fish
           /home/mpradyumna/.config/fish/functions/tide
           /home/mpradyumna/.config/fish/functions/tide.fish
           /home/mpradyumna/.config/fish/conf.d/_tide_init.fish
           /home/mpradyumna/.config/fish/completions/tide.fish
~/.config/fish/functions/_tide_item_git.fish (line 51): $(...) is not supported. In fish, please use '(git)'.
        "$(git $_set_dir_opt stash list 2>/dev/null | count
         ^
from sourcing file ~/.config/fish/functions/_tide_item_git.fish
	called on line 189 of file ~/.config/fish/functions/fisher.fish
in function 'fisher' with arguments 'install IlanCosman/tide@v6'
source: Error while reading file “/home/mpradyumna/.config/fish/functions/_tide_item_git.fish”
~/.config/fish/functions/_tide_sub_configure.fish (line 101): $(...) is not supported. In fish, please use '(set_color)'.
            "$(set_color -o)Choice [$(string join '/' $_tide_symbol_list $r q)] $(set_color normal)" input
             ^
from sourcing file ~/.config/fish/functions/_tide_sub_configure.fish
	called on line 189 of file ~/.config/fish/functions/fisher.fish
in function 'fisher' with arguments 'install IlanCosman/tide@v6'
source: Error while reading file “/home/mpradyumna/.config/fish/functions/_tide_sub_configure.fish”
~/.config/fish/functions/fish_prompt.fish (line 155): $(...) is not supported. In fish, please use '(commandline)'.
        if commandline --is-valid || test -z "$(commandline)"
                                              ^
from sourcing file ~/.config/fish/functions/fish_prompt.fish
	called on line 189 of file ~/.config/fish/functions/fisher.fish
in function 'fisher' with arguments 'install IlanCosman/tide@v6'
source: Error while reading file “/home/mpradyumna/.config/fish/functions/fish_prompt.fish”
~/.config/fish/functions/_tide_sub_configure.fish (line 101): $(...) is not supported. In fish, please use '(set_color)'.
            "$(set_color -o)Choice [$(string join '/' $_tide_symbol_list $r q)] $(set_color normal)" input
             ^
from sourcing file ~/.config/fish/functions/_tide_sub_configure.fish
	called on line 1 of file ~/.config/fish/conf.d/_tide_init.fish
in command substitution
	called on line 1 of file ~/.config/fish/conf.d/_tide_init.fish
in command substitution
	called on line 4 of file ~/.config/fish/conf.d/_tide_init.fish
in function '_tide_init_install'
	called on line 1 of file ~/.config/fish/functions/fisher.fish
in event handler: handler for generic event “_tide_init_install”
	called on line 191 of file ~/.config/fish/functions/fisher.fish
source: Error while reading file “/home/mpradyumna/.config/fish/functions/_tide_sub_configure.fish”
source: Error encountered while sourcing file “n/a”:
source: No such file or directory
_load_config: command not found
~/.config/fish/conf.d/_tide_init.fish (line 5): 
    _load_config lean
    ^
in function '_tide_init_install'
	called on line 1 of file ~/.config/fish/functions/fisher.fish
in event handler: handler for generic event “_tide_init_install”
	called on line 191 of file ~/.config/fish/functions/fisher.fish
_tide_finish: command not found
~/.config/fish/conf.d/_tide_init.fish (line 6): 
    _tide_finish
    ^
in function '_tide_init_install'
	called on line 1 of file ~/.config/fish/functions/fisher.fish
in event handler: handler for generic event “_tide_init_install”
	called on line 191 of file ~/.config/fish/functions/fisher.fish
Configure tide prompt? [Y/n] Y
Usage: tide [options] subcommand [options]

Options:
  -v or --version  print tide version number
  -h or --help     print this help message

Subcommands:
  configure   run interactive configuration wizard
  reload      reload tide configuration
  bug-report  print info for use in bug reports
Installed 1 plugin/s
~/.config/fish/functions/fish_prompt.fish (line 155): $(...) is not supported. In fish, please use '(commandline)'.
        if commandline --is-valid || test -z "$(commandline)"
                                              ^
from sourcing file ~/.config/fish/functions/fish_prompt.fish
in command substitution
source: Error while reading file “/home/mpradyumna/.config/fish/functions/fish_prompt.fish”

Steps to reproduce

  1. sudo apt install fish
  2. curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functi ons/fisher.fish | source && fisher install jorgebucaran/fisher
  3. fisher install IlanCosman/tide@v6

Screenshots

Environment

Output of tide bug-report:

fish version: 3.3.1
tide version: 6.0.1
term: foot
os: Pop OS
terminal emulator: kitty
fish startup: 14.27 millis
fisher plugins: jorgebucaran/fisher ilancosman/tide@v6

Additional context

None

@MSSRPRAD MSSRPRAD added the 🐛 bug Something isn't working label Dec 25, 2023
@jorgebucaran
Copy link
Contributor

It looks like you can fix this by upgrading to the latest version of Fish.

@MSSRPRAD
Copy link
Author

It looks like you can fix this by upgrading to the latest version of Fish.

@jorgebucaran Issue is there even with fish, version 3.6.4.


[I] mpradyumna@pop-os ~> fish --version
fish, version 3.6.4
[I] mpradyumna@pop-os ~> curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
fisher install version 4.4.4
/usr/bin/fish (deleted): command not found
- (line 85): 
                $fish_path --command "
                    if test -e $plugin
                        command cp -Rf $plugin/* $source
                    else
                        set temp (command mktemp -d)
                        set repo (string split -- \@ $plugin) || set repo[2] HEAD

                        if set path (string replace --regex -- '^(https://)?gitlab.com/' '' \$repo[1])
                            set name (string split -- / \$path)[-1]
                            set url https://gitlab.com/\$path/-/archive/\$repo[2]/\$name-\$repo[2].tar.gz
                        else
                            set url https://api.github.com/repos/\$repo[1]/tarball/\$repo[2]
                        end

                        echo Fetching (set_color --underline)\$url(set_color normal)

                        if command curl -q --silent -L \$url | command tar -xzC \$temp -f - 2>/dev/null
                            command cp -Rf \$temp/*/* $source
                        else
                            echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2
                            command rm -rf $source
                        end

                        command rm -rf \$temp
                    end

                    set files $source/* && string match --quiet --regex -- .+\.fish\\\$ \$files
                " &
                ^
in function 'fisher' with arguments 'install jorgebucaran/fisher'
Installing jorgebucaran/fisher
Updated 1 plugin/s
[I] mpradyumna@pop-os ~> fisher install IlanCosman/tide@v6
fisher install version 4.4.4
/usr/bin/fish (deleted): command not found
- (line 85): 
                $fish_path --command "
                    if test -e $plugin
                        command cp -Rf $plugin/* $source
                    else
                        set temp (command mktemp -d)
                        set repo (string split -- \@ $plugin) || set repo[2] HEAD

                        if set path (string replace --regex -- '^(https://)?gitlab.com/' '' \$repo[1])
                            set name (string split -- / \$path)[-1]
                            set url https://gitlab.com/\$path/-/archive/\$repo[2]/\$name-\$repo[2].tar.gz
                        else
                            set url https://api.github.com/repos/\$repo[1]/tarball/\$repo[2]
                        end

                        echo Fetching (set_color --underline)\$url(set_color normal)

                        if command curl -q --silent -L \$url | command tar -xzC \$temp -f - 2>/dev/null
                            command cp -Rf \$temp/*/* $source
                        else
                            echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2
                            command rm -rf $source
                        end

                        command rm -rf \$temp
                    end

                    set files $source/* && string match --quiet --regex -- .+\.fish\\\$ \$files
                " &
                ^
in function 'fisher' with arguments 'install IlanCosman/tide@v6'
Installing ilancosman/tide@v6
Updated 1 plugin/s

@Realiserad
Copy link

Realiserad commented Jan 4, 2024

I had the same issue after:

fisher remove IlanCosman/tide
fisher install IlanCosman/tide@v5

Apparently I was using an older version of fish provided by the Ubuntu 22 PPA. I added the official Fish PPA and reinstalled tide as suggested above.

fisher remove IlanCosman/tide@v5
sudo apt-add-repository ppa:fish-shell/release-3
sudo apt install -y fish

Then I restarted the terminal, and installed tide again.

fisher install IlanCosman/tide@v5

I'm now using version 3.7.0 of fish and the issue is gone. 😄

@sascha-wi
Copy link

https://github.com/IlanCosman/tide/wiki/Fish-version-compatibility

Clearly says fish version 3.6 should be compatible with the current tide version which it apparently isn't.

Same issue on debian sid.

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

4 participants