withfig / fig

Public issue tracker for Fig.
https://fig.io
MIT License
2.04k stars 54 forks source link

error with agnoster fish prompt #1102

Open al1p-R opened 2 years ago

al1p-R commented 2 years ago

Sanity checks

Issue Details

Description:

After installing fig (using brew install fig), I get the following error.

[: Missing argument at index 3
= box_blinking
               ^
~/.local/share/omf/themes/agnoster/fish_right_prompt.fish (line 32):
  if [ $cursor_name = "box_blinking" ]
     ^
in function 'fish_cursor_name_to_code'
    called on line 1 of file ~/.local/share/omf/themes/agnoster/fish_right_prompt.fish
in command substitution
    called on line 60 of file ~/.local/share/omf/themes/agnoster/fish_right_prompt.fish
in function 'prompt_vi_mode'
    called on line 4 of file -
in function 'fig_user_right_prompt'
in command substitution
in function 'fish_right_prompt'
in command substitution
[: Missing argument at index 3
= box_steady
             ^
~/.local/share/omf/themes/agnoster/fish_right_prompt.fish (line 34):
  else if [ $cursor_name = "box_steady" ]
          ^
in function 'fish_cursor_name_to_code'
    called on line 1 of file ~/.local/share/omf/themes/agnoster/fish_right_prompt.fish
in command substitution
    called on line 60 of file ~/.local/share/omf/themes/agnoster/fish_right_prompt.fish
in function 'prompt_vi_mode'
    called on line 4 of file -
in function 'fig_user_right_prompt'
in command substitution
in function 'fish_right_prompt'
in command substitution
[: Missing argument at index 3
= underline_blinking
                     ^
~/.local/share/omf/themes/agnoster/fish_right_prompt.fish (line 36):
  else if [ $cursor_name = "underline_blinking" ]
          ^
in function 'fish_cursor_name_to_code'
    called on line 1 of file ~/.local/share/omf/themes/agnoster/fish_right_prompt.fish
in command substitution
    called on line 60 of file ~/.local/share/omf/themes/agnoster/fish_right_prompt.fish
in function 'prompt_vi_mode'
    called on line 4 of file -
in function 'fig_user_right_prompt'
in command substitution
in function 'fish_right_prompt'
in command substitution
[: Missing argument at index 3
= underline_steady
                   ^
~/.local/share/omf/themes/agnoster/fish_right_prompt.fish (line 38):
  else if [ $cursor_name = "underline_steady" ]
          ^
in function 'fish_cursor_name_to_code'
    called on line 1 of file ~/.local/share/omf/themes/agnoster/fish_right_prompt.fish
in command substitution
    called on line 60 of file ~/.local/share/omf/themes/agnoster/fish_right_prompt.fish
in function 'prompt_vi_mode'
    called on line 4 of file -
in function 'fig_user_right_prompt'
in command substitution
in function 'fish_right_prompt'
in command substitution
[: Missing argument at index 3
= bar_blinking
               ^
~/.local/share/omf/themes/agnoster/fish_right_prompt.fish (line 40):
  else if [ $cursor_name = "bar_blinking" ]
          ^
in function 'fish_cursor_name_to_code'
    called on line 1 of file ~/.local/share/omf/themes/agnoster/fish_right_prompt.fish
in command substitution
    called on line 60 of file ~/.local/share/omf/themes/agnoster/fish_right_prompt.fish
in function 'prompt_vi_mode'
    called on line 4 of file -
in function 'fig_user_right_prompt'
in command substitution
in function 'fish_right_prompt'
in command substitution
[: Missing argument at index 3
= bar_steady
             ^
~/.local/share/omf/themes/agnoster/fish_right_prompt.fish (line 42):
  else if [ $cursor_name = "bar_steady" ]
          ^
in function 'fish_cursor_name_to_code'
    called on line 1 of file ~/.local/share/omf/themes/agnoster/fish_right_prompt.fish
in command substitution
    called on line 60 of file ~/.local/share/omf/themes/agnoster/fish_right_prompt.fish
in function 'prompt_vi_mode'
    called on line 4 of file -
in function 'fig_user_right_prompt'
in command substitution
in function 'fish_right_prompt'

I have pinned it down to the following part of the fig init fish post command. (Commenting those lines removes the error).

  if fig_fn_defined fish_right_prompt
    fig_copy_fn fish_right_prompt fig_user_right_prompt
    function fish_right_prompt; fig_wrap_prompt (fig_user_right_prompt); end
  end

Environment

"Everything seems to be working" in Debugger(fish)

# Fig Diagnostics
## Fig details:
  - Fig version: Version 1.0.56 (B403) [Beta] [French]
  - Bundle path: /Applications/Fig.app
  - Autocomplete: true
  - Settings.json: true
  - Accessibility: true
  - Number of specs: 0
  - Symlinked dotfiles: true
  - Only insert on tab: false
  - Keybindings path:
  - Installation Script: true
  - PseudoTerminal Path: <generated dynamically>
  - SecureKeyboardInput: false
  - SecureKeyboardProcess: <none>
## Hardware Info:
  - Model Name: MacBook Pro
  - Model Identifier: MacBookPro16,1
  - Chip:
  - Cores: 8
  - Memory: 32 GB
## OS Info:
  - macOS 12.2.1 (21D62)
## Environment:
  - User Shell: /usr/local/bin/fish
  - Current Directory: /Users/alp
  - CLI Installed: true
  - Executable Location: /Users/alp/.fig/bin/fig
  - Current Window ID: 3126/% (com.googlecode.iterm2)
  - Active Process: fish (68149) - /dev/ttys010
  - Installed via Brew: true
  - Environment Variables:
    - FIG_TERM=1
    - TERM_SESSION_ID=w4t0p0:4A499738-7B81-4143-9216-8ABAFFDD871E
    - FIG_CHECKED_PROMPTS=1
    - FIG_INTEGRATION_VERSION=8
    - PATH=/Users/alp/Documents/GitRepo/GitRevelator/GCP-K8S/google-cloud-sdk/bin:/Users/alp/.pyenv/shims:/usr/local/opt/python@3.9/bin:/usr/local/opt/openjdk/bin:/Users/alp/.fig/bin:/Users/alp/.local/bin:/Library/Apple/usr/bin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Library/TeX/texbin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/Users/alp/.local/bin
    - TERM=xterm-256color
    - FIG_TERM_VERSION=4.2.0
## Integrations:
  - SSH: false
  - TMUX: false
  - iTerm: installed!
  - Hyper: application is not present.
  - Visual Studio Code: installed!
  - Docker: false
al1p-R commented 2 years ago

20220313_ CleanShot_000327

mschrage commented 2 years ago

Hey @al1p-R, can you share instructions on how you've installed the agnoster theme?

al1p-R commented 2 years ago

HEllo ! that was a long time ago, but if I'm not mistaken, I used ohmyfish

curl -L https://get.oh-my.fish | fish
omf install agnoster
clo4 commented 2 years ago

See also #487 - likely same underlying cause. Weird that I can't repro this at all!