IlanCosman / tide

🌊 The ultimate Fish prompt.
MIT License
2.9k stars 108 forks source link

error this at exec fish :_tide_item_pwd.fish array indices start at 1, not 0. #273

Closed somethingGoneWrong closed 2 years ago

somethingGoneWrong commented 2 years ago

Describe the bug

when i execute fish i get this error message: _tide_item_pwd.fish (line 1): array indices start at 1, not 0.

Steps to reproduce

  1. open a terminal window/tilix app or other terminal emulator
  2. execute fish
  3. get this error (_tide_item_pwd.fish (line 1): array indices start at 1, not 0.)

Screenshots

Environment

Output of tide bug-report:

❯ tide bug-report                                                                                                                                                                            ─╯
fish, version 3.4.1
tide, version 4.0.0
xterm-256color

Additional context

here the complete error message:

❯ ~/.config/fish/functions/_tide_item_pwd.fish (line 1): array indices start at 1, not 0.                                                                                                    ─╯
string join -- '/' $splitPwd[1..$i] | string replace '~' $HOME
                                 ^
in command substitution
    called on line 18 of file ~/.config/fish/functions/_tide_item_pwd.fish
in function '_tide_item_pwd'
    called on line 1 of file ~/.config/fish/functions/_tide_left_prompt.fish
in command substitution
    called on line 11 of file ~/.config/fish/functions/_tide_left_prompt.fish
in function '_tide_left_prompt'
    called on line 13 of file ~/.config/fish/functions/_tide_prompt.fish
in function '_tide_prompt'
in command substitution
~/.config/fish/functions/_tide_item_pwd.fish (line 18): Unknown error while evaluating command substitution
        set -l parentDir (string join -- '/' $splitPwd[1..$i] | string replace '~' $HOME) # Use i from before increment
                         ^
in function '_tide_item_pwd'
    called on line 1 of file ~/.config/fish/functions/_tide_left_prompt.fish
in command substitution
    called on line 11 of file ~/.config/fish/functions/_tide_left_prompt.fish
in function '_tide_left_prompt'
    called on line 13 of file ~/.config/fish/functions/_tide_prompt.fish
in function '_tide_prompt'
IlanCosman commented 2 years ago

Please update to the latest version of tide. You're over a year out of date 😄