fig icon indicating copy to clipboard operation
fig copied to clipboard

command not found: fig

Open stepango opened this issue 3 years ago • 2 comments

Description:

Please include a detailed description of the issue (and an image or screen recording, if applicable)

Shows error in terminal launch even with fig in the path

#~/.zsh

export PATH=$PATH:/Users/stepan.goncharov/.arene/bin:/opt/homebrew/bin:/Users/stepan.goncharov/.fig/bin
# Fig pre block. Keep at the top of this file.
[[ -f "$HOME/.fig/shell/zshrc.pre.zsh" ]] && . "$HOME/.fig/shell/zshrc.pre.zsh"
...
(eval):3: command not found: fig

Details:

macOS Fig Shell
12.4.0 Version 1.0.59 (B486) /bin/zsh
fig diagnostic

Version 1.0.59 (B486) [U.S.] 
UserShell: /bin/zsh
Bundle path: /Applications/Fig.app
Autocomplete: true
Settings.json: true
CLI installed: true
CLI tool path: /Users/stepan.goncharov/.fig/bin/fig
Accessibility: true
SSH Integration: false
Tmux Integration: false
iTerm Integration: true [Authenticated]
Hyper Integration: false
VSCode Integration: true
Docker Integration: false
Symlinked dotfiles: false
Only insert on tab: false
UNIX Socket Exists: true
Installation Script: true
PseudoTerminal Path: /opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/stepan.goncharov/toolbox:/Users/stepan.goncharov/.fig/bin:/Users/stepan.goncharov/.local/bin:/Users/stepan.goncharov/.arene/bin:/opt/homebrew/bin:/Users/stepan.goncharov/.fig/bin
SecureKeyboardInput: false
SecureKeyboardProcess: 
Current active process: zsh (27743) - /dev/ttys015
Current terminal session: w0t0p0:20A97E42-04C8-4C72-8E98-942CC65BD20E
Current working directory: /Users/stepan.goncharov
Current window identifier: 11793/% (com.googlecode.iterm2)

stepango avatar Aug 01 '22 16:08 stepango

Hey @stepango! Sorry for the trouble. Weird that it's saying command not found: fig... could you quickly add set -x to the top of ~/.zshenv (create the file if it doesn't exist) then run exec zsh and send the output?

That should provide a log of everything that was executed so we'll know exactly why it's failing.

Alternatively if you want to hop in a call with me I'm happy to help out 1:1 :) https://calendly.com/robert-fig/support

clo4 avatar Aug 03 '22 06:08 clo4

@stepango quick bump! Would love to figure this out with you 🙂

clo4 avatar Aug 04 '22 23:08 clo4

Sorry for delay. Let me try -x

stepango avatar Aug 17 '22 20:08 stepango

(eval):3: command not found: fig
+/Users/stepan.goncharov/.zshrc:3> [[ -f /Users/stepan.goncharov/.fig/shell/zshrc.pre.zsh ]]
+/Users/stepan.goncharov/.zshrc:3> . /Users/stepan.goncharov/.fig/shell/zshrc.pre.zsh
+/Users/stepan.goncharov/.fig/shell/zshrc.pre.zsh:1> /Users/stepan.goncharov/.local/bin/fig init zsh pre --rcfile zshrc
+/Users/stepan.goncharov/.fig/shell/zshrc.pre.zsh:1> eval $'# pre for zsh\n#!/usr/bin/env bash\n\nmkdir -p ~/.fig/bin > /dev/null\n\npathadd() {\n  if [[ -d "$1" ]] && [[ ":$PATH:" != *":$1:"* ]]; then\n    PATH="${PATH:+"$PATH:"}$1"\n  fi\n}\n\npathadd ~/.fig/bin\npathadd ~/.local/bin\n\nif [[ -n "${FIG_NEW_SESSION}" ]]; then\n  unset TERM_SESSION_ID\n  unset FIG_TERM\n  unset FIG_ENV_VAR\n  unset FIG_NEW_SESSION\nfi\n\n# 0 = Yes, 1 = No, 2 = Fallback to FIG_TERM\nfig _ should-figterm-launch 1>/dev/null 2>&1\nSHOULD_FIGTERM_LAUNCH=$?\n\n# Only launch figterm if current session is not already inside PTY and command exists.\n# PWSH var is set when launched by `pwsh -Login`, in which case we don\'t want to init.\n# It is not necessary in Fish.\nif   [[ ! "${TERM_PROGRAM}" = WarpTerminal ]] \\\n  && [[ -z "${__PWSH_LOGIN_CHECKED}" ]] \\\n  && [[ -z "${INSIDE_EMACS}" ]] \\\n  && [[ "$__CFBundleIdentifier" != "com.vandyke.SecureCRT" ]] \\\n  && [[ -t 1 ]] \\\n  && [[ -z "${PROCESS_LAUNCHED_BY_FIG}" ]] \\\n  && [[ -z "${FIG_PTY}" ]] \\\n  && command -v figterm 1>/dev/null 2>&1 \\\n  && [[ ("${SHOULD_FIGTERM_LAUNCH}" -eq 0) || (("${SHOULD_FIGTERM_LAUNCH}" -eq 2) && (-z "${FIG_TERM}" || (-z "${FIG_TERM_TMUX}" && -n "${TMUX}"))) ]]\nthen\n\n  # Generated automatically by iTerm and Terminal, but needs to be\n  # explicitly set for VSCode and Hyper. This variable is inherited when\n  # new ttys are created using Tmux of VSCode and must be explictly\n  # overwritten.\n  if [[ -z "${TERM_SESSION_ID}" || -n "${TMUX}" ]]; then\n    if command -v uuidgen 1>/dev/null 2>&1; then\n      export TERM_SESSION_ID="$(uuidgen)"\n    else\n      export TERM_SESSION_ID="$(powershell -Command "[guid]::NewGuid().ToString()")"\n    fi\n  fi\n  export FIG_INTEGRATION_VERSION=8\n  # Pty module sets FIG_TERM or FIG_TERM_TMUX to avoid running twice.\n  FIG_SHELL=$(fig _ get-shell)\n  FIG_IS_LOGIN_SHELL="${FIG_IS_LOGIN_SHELL:=\'0\'}"\n\n  if ([[ -n "$BASH" ]] && shopt -q login_shell) \\\n    || [[ -n "$ZSH_NAME" && -o login ]]; then\n    FIG_IS_LOGIN_SHELL=1\n  fi\n\n  # Do not launch figterm in non-interactive shells (like VSCode Tasks)\n  if [[ $- == *i* ]]; then\n    FIG_TERM_NAME="${FIG_SHELL} (figterm)"\n    \n    if [[ "$OSTYPE" == "darwin"* ]]; then\n        FIG_SHELL_PATH="$(command -v "$FIG_TERM_NAME" || echo "${HOME}/.fig/bin/$(basename "${FIG_SHELL}") (figterm)")"\n\n        # Only copy figterm binary if it doesn\'t already exist\n        if [[ ! -f "${FIG_SHELL_PATH}" ]]; then\n          cp -p "$(command -v figterm)" "${FIG_SHELL_PATH}"\n        fi\n    else\n      FIG_SHELL_PATH="$(command -v figterm)"\n    fi\n\n    FIG_EXECUTION_STRING="${BASH_EXECUTION_STRING:=$ZSH_EXECUTION_STRING}"\n\n    # Get initial text.\n    INITIAL_TEXT=""\n    if [[ -z "${BASH}" || "${BASH_VERSINFO[0]}" -gt "3" ]]; then\n      while read -t 0; do\n        if [[ -n "${BASH}" ]]; then\n          read -r\n        fi\n        INITIAL_TEXT="${INITIAL_TEXT}${REPLY}\\n"\n      done\n    fi\n    FIG_EXECUTION_STRING="${FIG_EXECUTION_STRING}" FIG_START_TEXT="$(printf "%b" "${INITIAL_TEXT}")" FIG_SHELL="${FIG_SHELL}" FIG_IS_LOGIN_SHELL="${FIG_IS_LOGIN_SHELL}" exec -a "${FIG_TERM_NAME}" "${FIG_SHELL_PATH}"\n  fi\n# else\n#   FIG_DID_NOT_EXEC_FIGTERM=1\nfi'
+(eval):4> mkdir -p /Users/stepan.goncharov/.fig/bin
+(eval):12> pathadd /Users/stepan.goncharov/.fig/bin
+pathadd:1> [[ -d /Users/stepan.goncharov/.fig/bin ]]
+pathadd:1> [[ :/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/stepan.goncharov/toolbox:/Users/stepan.goncharov/.fig/bin:/Users/stepan.goncharov/.local/bin: != *:/Users/stepan.goncharov/.fig/bin:* ]]
+(eval):13> pathadd /Users/stepan.goncharov/.local/bin
+pathadd:1> [[ -d /Users/stepan.goncharov/.local/bin ]]
+pathadd:1> [[ :/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/stepan.goncharov/toolbox:/Users/stepan.goncharov/.fig/bin:/Users/stepan.goncharov/.local/bin: != *:/Users/stepan.goncharov/.local/bin:* ]]
+(eval):15> [[ -n '' ]]
+(eval):23> fig _ should-figterm-launch
+(eval):24> SHOULD_FIGTERM_LAUNCH=2
+(eval):29> [[ ! iTerm.app = WarpTerminal ]]
+(eval):30> [[ -z '' ]]
+(eval):31> [[ -z '' ]]
+(eval):32> [[ com.googlecode.iterm2 != com.vandyke.SecureCRT ]]
+(eval):33> [[ -t 1 ]]
+(eval):34> [[ -z '' ]]
+(eval):35> [[ -z '' ]]
+(eval):36> command -v figterm
+(eval):37> [[ 2 -eq 0 || 2 -eq 2 && -z 1 || -z '' && -n '' ]]
+/Users/stepan.goncharov/.zshrc:4> export PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/stepan.goncharov/toolbox:/Users/stepan.goncharov/.fig/bin:/Users/stepan.goncharov/.local/bin:/Users/stepan.goncharov/.arene/bin:/opt/homebrew/bin:/Users/stepan.goncharov/.fig/bin
+/Users/stepan.goncharov/.zshrc:6> alias 'apply=. ~/.zshrc'
+/Users/stepan.goncharov/.zshrc:7> alias 'ssm=aws ssm start-session --target'
+/Users/stepan.goncharov/.zshrc:8> alias 'wpghe=ssh -p 122 -A [email protected]'
+/Users/stepan.goncharov/.zshrc:9> alias 'kge=kubectl get events --sort-by='\''{.lastTimestamp}'\'
+/Users/stepan.goncharov/.zshrc:10> alias 'onebox=ssh -A onebox'
+/Users/stepan.goncharov/.zshrc:11> alias 'vlogin=vaultaccess assume level5/user/aws trusted-user'
...[REDACTED]
+/Users/stepan.goncharov/.zshrc:33> starship init zsh
+/Users/stepan.goncharov/.zshrc:33> eval 'source <(/opt/homebrew/bin/starship init zsh --print-full-init)'
+(eval):1> source /dev/fd/13
+/dev/fd/13:10> zmodload zsh/parameter
+/dev/fd/13:13> [[ 5.8.1 == ([1-4]*) ]]
+/dev/fd/13:19> zmodload zsh/datetime
+/dev/fd/13:20> zmodload zsh/mathfunc
+/dev/fd/13:56> autoload -Uz add-zsh-hook
+/dev/fd/13:57> add-zsh-hook precmd prompt_starship_precmd
+add-zsh-hook:15> emulate -L zsh
+add-zsh-hook:17> local -a hooktypes
+add-zsh-hook:18> hooktypes=( chpwd precmd preexec periodic zshaddhistory zshexit zsh_directory_name )
+add-zsh-hook:22> local usage='Usage: add-zsh-hook hook function\nValid hooks are:\n  chpwd precmd preexec periodic zshaddhistory zshexit zsh_directory_name'
+add-zsh-hook:24> local opt
+add-zsh-hook:25> local -a autoopts
+add-zsh-hook:26> integer del list help
+add-zsh-hook:28> getopts dDhLUzk opt
+add-zsh-hook:55> shift 0
+add-zsh-hook:57> ((  list  ))
+add-zsh-hook:60> ((  help || 2 != 2 || 2 == 0  ))
+add-zsh-hook:65> local hook=precmd_functions
+add-zsh-hook:66> local fn=prompt_starship_precmd
+add-zsh-hook:68> ((  del  ))
+add-zsh-hook:83> ((  1  ))
+add-zsh-hook:84> ((  0 == 0  ))
+add-zsh-hook:85> typeset -ga precmd_functions
+add-zsh-hook:86> set -A precmd_functions fig_precmd prompt_starship_precmd
+add-zsh-hook:92> autoload -- prompt_starship_precmd
+/dev/fd/13:58> add-zsh-hook preexec prompt_starship_preexec
+add-zsh-hook:15> emulate -L zsh
+add-zsh-hook:17> local -a hooktypes
+add-zsh-hook:18> hooktypes=( chpwd precmd preexec periodic zshaddhistory zshexit zsh_directory_name )
+add-zsh-hook:22> local usage='Usage: add-zsh-hook hook function\nValid hooks are:\n  chpwd precmd preexec periodic zshaddhistory zshexit zsh_directory_name'
+add-zsh-hook:24> local opt
+add-zsh-hook:25> local -a autoopts
+add-zsh-hook:26> integer del list help
+add-zsh-hook:28> getopts dDhLUzk opt
+add-zsh-hook:55> shift 0
+add-zsh-hook:57> ((  list  ))
+add-zsh-hook:60> ((  help || 2 != 2 || 3 == 0  ))
+add-zsh-hook:65> local hook=preexec_functions
+add-zsh-hook:66> local fn=prompt_starship_preexec
+add-zsh-hook:68> ((  del  ))
+add-zsh-hook:83> ((  1  ))
+add-zsh-hook:84> ((  0 == 0  ))
+add-zsh-hook:85> typeset -ga preexec_functions
+add-zsh-hook:86> set -A preexec_functions fig_preexec prompt_starship_preexec
+add-zsh-hook:92> autoload -- prompt_starship_preexec
+/dev/fd/13:67> __starship_preserved_zle_keymap_select=''
+/dev/fd/13:68> [[ -z '' ]]
+/dev/fd/13:69> zle -N zle-keymap-select starship_zle-keymap-select
+/dev/fd/13:79> __starship_get_time
+__starship_get_time:1> ((  STARSHIP_CAPTURED_TIME = int(rint(EPOCHREALTIME * 1000))  ))
+/dev/fd/13:79> STARSHIP_START_TIME=1660766929701
+/dev/fd/13:81> export STARSHIP_SHELL=zsh
+/dev/fd/13:84> STARSHIP_SESSION_KEY=2724920085284642025510646
+/dev/fd/13:85> STARSHIP_SESSION_KEY=27249200852846420255106460000000000000000
+/dev/fd/13:86> export STARSHIP_SESSION_KEY=2724920085284642
+/dev/fd/13:88> VIRTUAL_ENV_DISABLE_PROMPT=1
+/dev/fd/13:90> setopt promptsubst
+/dev/fd/13:92> PROMPT='$(/opt/homebrew/bin/starship prompt --terminal-width="$COLUMNS" --keymap="${KEYMAP:-}" --status="$STARSHIP_CMD_STATUS" --pipestatus="${STARSHIP_PIPE_STATUS[*]}" --cmd-duration="${STARSHIP_DURATION:-}" --jobs="$STARSHIP_JOBS_COUNT")'
+/dev/fd/13:93> RPROMPT='$(/opt/homebrew/bin/starship prompt --right --terminal-width="$COLUMNS" --keymap="${KEYMAP:-}" --status="$STARSHIP_CMD_STATUS" --pipestatus="${STARSHIP_PIPE_STATUS[*]}" --cmd-duration="${STARSHIP_DURATION:-}" --jobs="$STARSHIP_JOBS_COUNT")'
+/dev/fd/13:94> PROMPT2=+/dev/fd/13:94> /opt/homebrew/bin/starship prompt --continuation
+/dev/fd/13:94> PROMPT2=$'%{\C-[[38;5;8m%}∙%{\C-[[0m%} '
+/Users/stepan.goncharov/.zshrc:36> [[ -f /Users/stepan.goncharov/.fig/shell/zshrc.post.zsh ]]
+/Users/stepan.goncharov/.zshrc:36> . /Users/stepan.goncharov/.fig/shell/zshrc.post.zsh
+/Users/stepan.goncharov/.fig/shell/zshrc.post.zsh:1> /Users/stepan.goncharov/.local/bin/fig init zsh post --rcfile zshrc
+/Users/stepan.goncharov/.fig/shell/zshrc.post.zsh:1> eval $'# post for zsh\nif [ -z "${FIG_DOTFILES_SOURCED}" ]; then\n  # alias =\'\'\n  FIG_DOTFILES_SOURCED=1\nfi\n\nif [ -z "${FIG_CHECKED_PROMPTS}" ]; then\n  (fig app prompts &)\n  FIG_CHECKED_PROMPTS=1\nfi\n\nif [[ -n "$ZSH_NAME" ]]; then\n\npathadd() {\n  if [[ -d "$1" ]] && [[ ":$PATH:" != *":$1:"* ]]; then\n    PATH="${PATH:+"$PATH:"}$1"\n  fi\n}\n\npathadd ~/.fig/bin\npathadd ~/.local/bin\n\nif [[ $TTY != "not a tty" ]]; then\n  # # Open workflows on keyboard shortcut\n  # if [[ -z "${FIG_WORKFLOWS_KEYBIND}" ]]\n  # then\n  #   export FIG_WORKFLOWS_KEYBIND=\'^f\'\n  # fi\n  #\n  # fig-open-workflows() {\n  #     fig run < $TTY\n  #     zle .kill-whole-line\n  #     zle .accept-line\n  # }\n  # zle -N fig-open-workflows\n  # bindkey ${FIG_WORKFLOWS_KEYBIND} fig-open-workflows\nfi\n\n# if [[ "$FIG_DID_NOT_EXEC_FIGTERM" = 1 && "$FIG_TERM" != 1 ]] || [[ -n "${INSIDE_EMACS+x}" ]]; then\n#   unset FIG_DID_NOT_EXEC_FIGTERM\n#   return\n# fi\n\nexport TTY=$(tty)\nexport FIG_PID="$$"\n\nFIG_HOSTNAME=$(fig _ hostname || hostname -f 2> /dev/null || hostname)\nFIG_SHELL_PATH=$(fig _ get-shell)\n\nif [[ -e /proc/1/cgroup ]] && grep -q docker /proc/1/cgroup; then\n  FIG_IN_DOCKER=1\nelif [[ -f /.dockerenv ]]; then\n  FIG_IN_DOCKER=1\nelse\n  FIG_IN_DOCKER=0\nfi\n\nfunction fig_osc { printf "\\033]697;$1\\007" "${@:2}"; }\n\nFIG_HAS_SET_PROMPT=0\n\nfig_preexec() {\n  # Restore user defined prompt before executing.\n  [[ -v PS1 ]] && PS1="$FIG_USER_PS1"\n  [[ -v PROMPT ]] && PROMPT="$FIG_USER_PROMPT"\n  [[ -v prompt ]] && prompt="$FIG_USER_prompt"\n\n  [[ -v PS2 ]] && PS2="$FIG_USER_PS2"\n  [[ -v PROMPT2 ]] && PROMPT2="$FIG_USER_PROMPT2"\n\n  [[ -v PS3 ]] && PS3="$FIG_USER_PS3"\n  [[ -v PROMPT3 ]] && PROMPT3="$FIG_USER_PROMPT3"\n\n  [[ -v PS4 ]] && PS4="$FIG_USER_PS4"\n  [[ -v PROMPT4 ]] && PROMPT4="$FIG_USER_PROMPT4"\n\n  [[ -v RPS1 ]] && RPS1="$FIG_USER_RPS1"\n  [[ -v RPROMPT ]] && RPROMPT="$FIG_USER_RPROMPT"\n\n  [[ -v RPS2 ]] && RPS2="$FIG_USER_RPS2"\n  [[ -v RPROMPT2 ]] && RPROMPT2="$FIG_USER_RPROMPT2"\n\n  FIG_HAS_SET_PROMPT=0\n  fig_osc PreExec\n}\n\nfig_precmd() {\n  local LAST_STATUS=$?\n\n  fig_reset_hooks\n\n  if [[ -n "${SSH_TTY}" ]]; then\n    fig_osc "SSH=1"\n  else\n    fig_osc "SSH=0"\n  fi\n  fig_osc "Docker=%d" "${FIG_IN_DOCKER}"\n  fig_osc "Dir=%s" "$PWD"\n  fig_osc "Shell=zsh"\n  fig_osc "ShellPath=%s" "${FIG_SHELL_PATH:-$SHELL}"\n  if [[ -n "${WSL_DISTRO_NAME}" ]]; then\n    fig_osc "WSLDistro=%s" "${WSL_DISTRO_NAME}"\n  fi\n  fig_osc "PID=%d" "$$"\n  fig_osc "SessionId=%s" "${TERM_SESSION_ID}"\n  fig_osc "ExitCode=%s" "${LAST_STATUS}"\n  fig_osc "TTY=%s" "${TTY}"\n  fig_osc "Log=%s" "${FIG_LOG_LEVEL}"\n  fig_osc "ZshAutosuggestionColor=%s" "${ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE}"\n  fig_osc "Hostname=%s@%s" "${USER:-root}" "${FIG_HOSTNAME}"\n\n  if [ $FIG_HAS_SET_PROMPT -eq 1 ]; then\n    # ^C pressed while entering command, call preexec manually to clear fig prompts.\n    fig_preexec\n  fi\n\n  START_PROMPT=$\'\\033]697;StartPrompt\\007\'\n  END_PROMPT=$\'\\033]697;EndPrompt\\007\'\n  NEW_CMD=$\'\\033]697;NewCmd\\007\'\n\n  # Save user defined prompts.\n  FIG_USER_PS1="$PS1"\n  FIG_USER_PROMPT="$PROMPT"\n  FIG_USER_prompt="$prompt"\n\n  FIG_USER_PS2="$PS2"\n  FIG_USER_PROMPT2="$PROMPT2"\n\n  FIG_USER_PS3="$PS3"\n  FIG_USER_PROMPT3="$PROMPT3"\n\n  FIG_USER_PS4="$PS4"\n  FIG_USER_PROMPT4="$PROMPT4"\n\n  FIG_USER_RPS1="$RPS1"\n  FIG_USER_RPROMPT="$RPROMPT"\n\n  FIG_USER_RPS2="$RPS2"\n  FIG_USER_RPROMPT2="$RPROMPT2"\n\n  if [[ -v PROMPT ]]; then\n    PROMPT="%{$START_PROMPT%}$PROMPT%{$END_PROMPT$NEW_CMD%}"\n  elif [[ -v prompt ]]; then\n    prompt="%{$START_PROMPT%}$prompt%{$END_PROMPT$NEW_CMD%}"\n  else\n    PS1="%{$START_PROMPT%}$PS1%{$END_PROMPT$NEW_CMD%}"\n  fi\n\n  if [[ -v PROMPT2 ]]; then\n    PROMPT2="%{$START_PROMPT%}$PROMPT2%{$END_PROMPT%}"\n  else\n    PS2="%{$START_PROMPT%}$PS2%{$END_PROMPT%}"\n  fi\n\n  if [[ -v PROMPT3 ]]; then\n    PROMPT3="%{$START_PROMPT%}$PROMPT3%{$END_PROMPT$NEW_CMD%}"\n  else\n    PS3="%{$START_PROMPT%}$PS3%{$END_PROMPT$NEW_CMD%}"\n  fi\n\n  if [[ -v PROMPT4 ]]; then\n    PROMPT4="%{$START_PROMPT%}$PROMPT4%{$END_PROMPT%}"\n  else\n    PS4="%{$START_PROMPT%}$PS4%{$END_PROMPT%}"\n  fi\n\n  # Previously, the af-magic theme added a final % to expand. We need to paste without the %\n  # to avoid doubling up and mangling the prompt. I\'ve removed this workaround for now.\n  if [[ -v RPROMPT ]]; then\n    RPROMPT="%{$START_PROMPT%}$RPROMPT%{$END_PROMPT%}"\n  else\n    RPS1="%{$START_PROMPT%}$RPS1%{$END_PROMPT%}"\n  fi\n\n  if [[ -v RPROMPT2 ]]; then\n    RPROMPT2="%{$START_PROMPT%}$RPROMPT2%{$END_PROMPT%}"\n  else\n    RPS2="%{$START_PROMPT%}$RPS2%{$END_PROMPT%}"\n  fi\n\n  FIG_HAS_SET_PROMPT=1\n\n  # Check if we have a new dotfiles to load\n  if command -v fig >/dev/null 2>&1; then\n    if fig _ prompt-dotfiles-changed; then\n      unset FIG_DOTFILES_SOURCED\n      exec zsh\n    fi\n  fi\n}\n\nfig_reset_hooks() {\n  if [[ "$precmd_functions[-1]" != fig_precmd ]]; then\n    precmd_functions=(${(@)precmd_functions:#fig_precmd} fig_precmd)\n  fi\n  if [[ "$preexec_functions[1]" != fig_preexec ]]; then\n    preexec_functions=(fig_preexec ${(@)preexec_functions:#fig_preexec})\n  fi\n}\n\nfig_reset_hooks\nif [[ -n "${PROCESS_LAUNCHED_BY_FIG}" ]]; then\n  fig_osc DoneSourcing\nfi\n\nfi'
+(eval):2> [ -z '' ']'
+(eval):4> FIG_DOTFILES_SOURCED=1
+(eval):7> [ -z 1 ']'
+(eval):12> [[ -n zsh ]]
+(eval):20> pathadd /Users/stepan.goncharov/.fig/bin
+pathadd:1> [[ -d /Users/stepan.goncharov/.fig/bin ]]
+pathadd:1> [[ :/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/stepan.goncharov/toolbox:/Users/stepan.goncharov/.fig/bin:/Users/stepan.goncharov/.local/bin:/Users/stepan.goncharov/.arene/bin:/opt/homebrew/bin:/Users/stepan.goncharov/.fig/bin: != *:/Users/stepan.goncharov/.fig/bin:* ]]
+(eval):21> pathadd /Users/stepan.goncharov/.local/bin
+pathadd:1> [[ -d /Users/stepan.goncharov/.local/bin ]]
+pathadd:1> [[ :/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/stepan.goncharov/toolbox:/Users/stepan.goncharov/.fig/bin:/Users/stepan.goncharov/.local/bin:/Users/stepan.goncharov/.arene/bin:/opt/homebrew/bin:/Users/stepan.goncharov/.fig/bin: != *:/Users/stepan.goncharov/.local/bin:* ]]
+(eval):23> [[ /dev/ttys002 != not\ a\ tty ]]
+(eval):44> tty
+(eval):44> export TTY=/dev/ttys002
+(eval):45> export FIG_PID=16162
+(eval):47> FIG_HOSTNAME=+(eval):47> fig _ hostname
+(eval):47> FIG_HOSTNAME=ip-10-176-26-70.us-west-2.compute.internal
+(eval):48> FIG_SHELL_PATH=+(eval):48> fig _ get-shell
+(eval):48> FIG_SHELL_PATH=/bin/zsh
+(eval):50> [[ -e /proc/1/cgroup ]]
+(eval):52> [[ -f /.dockerenv ]]
+(eval):55> FIG_IN_DOCKER=0
+(eval):60> FIG_HAS_SET_PROMPT=0
+(eval):201> fig_reset_hooks
+fig_reset_hooks:1> [[ prompt_starship_precmd != fig_precmd ]]
+fig_reset_hooks:2> precmd_functions=( prompt_starship_precmd fig_precmd )
+fig_reset_hooks:4> [[ fig_preexec != fig_preexec ]]
+(eval):202> [[ -n '' ]]
+prompt_starship_precmd:2> STARSHIP_CMD_STATUS=0 STARSHIP_PIPE_STATUS=( 0 )
+prompt_starship_precmd:6> ((  1  ))
+prompt_starship_precmd:7> __starship_get_time
+__starship_get_time:1> ((  STARSHIP_CAPTURED_TIME = int(rint(EPOCHREALTIME * 1000))  ))
+prompt_starship_precmd:7> ((  STARSHIP_DURATION = STARSHIP_CAPTURED_TIME - STARSHIP_START_TIME  ))
+prompt_starship_precmd:8> unset STARSHIP_START_TIME
+prompt_starship_precmd:15> STARSHIP_JOBS_COUNT=0
+fig_precmd:1> local LAST_STATUS=0
+fig_precmd:3> fig_reset_hooks
+fig_reset_hooks:1> [[ fig_precmd != fig_precmd ]]
+fig_reset_hooks:4> [[ fig_preexec != fig_preexec ]]
+fig_precmd:5> [[ -n '' ]]
+fig_precmd:8> fig_osc 'SSH=0'
+fig_osc:0> printf '\033]697;SSH=0\007'
+fig_precmd:10> fig_osc 'Docker=%d' 0
+fig_osc:0> printf '\033]697;Docker=%d\007' 0
+fig_precmd:11> fig_osc 'Dir=%s' /Users/stepan.goncharov
+fig_osc:0> printf '\033]697;Dir=%s\007' /Users/stepan.goncharov
+fig_precmd:12> fig_osc 'Shell=zsh'
+fig_osc:0> printf '\033]697;Shell=zsh\007'
+fig_precmd:13> fig_osc 'ShellPath=%s' /bin/zsh
+fig_osc:0> printf '\033]697;ShellPath=%s\007' /bin/zsh
+fig_precmd:14> [[ -n '' ]]
+fig_precmd:17> fig_osc 'PID=%d' 16162
+fig_osc:0> printf '\033]697;PID=%d\007' 16162
+fig_precmd:18> fig_osc 'SessionId=%s' w0t0p0:EE14EAAE-14E4-455A-8A64-AF47B9180E52
+fig_osc:0> printf '\033]697;SessionId=%s\007' w0t0p0:EE14EAAE-14E4-455A-8A64-AF47B9180E52
+fig_precmd:19> fig_osc 'ExitCode=%s' 0
+fig_osc:0> printf '\033]697;ExitCode=%s\007' 0
+fig_precmd:20> fig_osc 'TTY=%s' /dev/ttys002
+fig_osc:0> printf '\033]697;TTY=%s\007' /dev/ttys002
+fig_precmd:21> fig_osc 'Log=%s' ''
+fig_osc:0> printf '\033]697;Log=%s\007' ''
+fig_precmd:22> fig_osc 'ZshAutosuggestionColor=%s' ''
+fig_osc:0> printf '\033]697;ZshAutosuggestionColor=%s\007' ''
+fig_precmd:23> fig_osc 'Hostname=%s@%s' stepan.goncharov ip-10-176-26-70.us-west-2.compute.internal
+fig_osc:0> printf '\033]697;Hostname=%s@%s\007' stepan.goncharov ip-10-176-26-70.us-west-2.compute.internal
+fig_precmd:25> [ 0 -eq 1 ']'
+fig_precmd:30> START_PROMPT=$'\C-[]697;StartPrompt\C-G'
+fig_precmd:31> END_PROMPT=$'\C-[]697;EndPrompt\C-G'
+fig_precmd:32> NEW_CMD=$'\C-[]697;NewCmd\C-G'
+fig_precmd:35> FIG_USER_PS1='$(/opt/homebrew/bin/starship prompt --terminal-width="$COLUMNS" --keymap="${KEYMAP:-}" --status="$STARSHIP_CMD_STATUS" --pipestatus="${STARSHIP_PIPE_STATUS[*]}" --cmd-duration="${STARSHIP_DURATION:-}" --jobs="$STARSHIP_JOBS_COUNT")'
+fig_precmd:36> FIG_USER_PROMPT='$(/opt/homebrew/bin/starship prompt --terminal-width="$COLUMNS" --keymap="${KEYMAP:-}" --status="$STARSHIP_CMD_STATUS" --pipestatus="${STARSHIP_PIPE_STATUS[*]}" --cmd-duration="${STARSHIP_DURATION:-}" --jobs="$STARSHIP_JOBS_COUNT")'
+fig_precmd:37> FIG_USER_prompt='$(/opt/homebrew/bin/starship prompt --terminal-width="$COLUMNS" --keymap="${KEYMAP:-}" --status="$STARSHIP_CMD_STATUS" --pipestatus="${STARSHIP_PIPE_STATUS[*]}" --cmd-duration="${STARSHIP_DURATION:-}" --jobs="$STARSHIP_JOBS_COUNT")'
+fig_precmd:39> FIG_USER_PS2=$'%{\C-[[38;5;8m%}∙%{\C-[[0m%} '
+fig_precmd:40> FIG_USER_PROMPT2=$'%{\C-[[38;5;8m%}∙%{\C-[[0m%} '
+fig_precmd:42> FIG_USER_PS3='?# '
+fig_precmd:43> FIG_USER_PROMPT3='?# '
+fig_precmd:45> FIG_USER_PS4='+%N:%i> '
+fig_precmd:46> FIG_USER_PROMPT4='+%N:%i> '
+fig_precmd:48> FIG_USER_RPS1=''
+fig_precmd:49> FIG_USER_RPROMPT='$(/opt/homebrew/bin/starship prompt --right --terminal-width="$COLUMNS" --keymap="${KEYMAP:-}" --status="$STARSHIP_CMD_STATUS" --pipestatus="${STARSHIP_PIPE_STATUS[*]}" --cmd-duration="${STARSHIP_DURATION:-}" --jobs="$STARSHIP_JOBS_COUNT")'
+fig_precmd:51> FIG_USER_RPS2=''
+fig_precmd:52> FIG_USER_RPROMPT2=''
+fig_precmd:54> [[ -v PROMPT ]]
+fig_precmd:55> PROMPT=$'%{\C-[]697;StartPrompt\C-G%}$(/opt/homebrew/bin/starship prompt --terminal-width="$COLUMNS" --keymap="${KEYMAP:-}" --status="$STARSHIP_CMD_STATUS" --pipestatus="${STARSHIP_PIPE_STATUS[*]}" --cmd-duration="${STARSHIP_DURATION:-}" --jobs="$STARSHIP_JOBS_COUNT")%{\C-[]697;EndPrompt\C-G\C-[]697;NewCmd\C-G%}'
+fig_precmd:62> [[ -v PROMPT2 ]]
+fig_precmd:63> PROMPT2=$'%{\C-[]697;StartPrompt\C-G%}%{\C-[[38;5;8m%}∙%{\C-[[0m%} %{\C-[]697;EndPrompt\C-G%}'
+fig_precmd:68> [[ -v PROMPT3 ]]
+fig_precmd:69> PROMPT3=$'%{\C-[]697;StartPrompt\C-G%}?# %{\C-[]697;EndPrompt\C-G\C-[]697;NewCmd\C-G%}'
+fig_precmd:74> [[ -v PROMPT4 ]]
+fig_precmd:75> PROMPT4=$'%{\C-[]697;StartPrompt\C-G%}+%N:%i> %{\C-[]697;EndPrompt\C-G%}'
+fig_precmd:82> [[ -v RPROMPT ]]
+fig_precmd:83> RPROMPT=$'%{\C-[]697;StartPrompt\C-G%}$(/opt/homebrew/bin/starship prompt --right --terminal-width="$COLUMNS" --keymap="${KEYMAP:-}" --status="$STARSHIP_CMD_STATUS" --pipestatus="${STARSHIP_PIPE_STATUS[*]}" --cmd-duration="${STARSHIP_DURATION:-}" --jobs="$STARSHIP_JOBS_COUNT")%{\C-[]697;EndPrompt\C-G%}'
+fig_precmd:88> [[ -v RPROMPT2 ]]
+fig_precmd:91> RPS2=$'%{\C-[]697;StartPrompt\C-G%}%{\C-[]697;EndPrompt\C-G%}'
+fig_precmd:94> FIG_HAS_SET_PROMPT=1
+fig_precmd:97> command -v fig
+fig_precmd:98> fig _ prompt-dotfiles-changed
+/bin/zsh:1> /opt/homebrew/bin/starship prompt '--terminal-width=80' '--keymap=' '--status=0' '--pipestatus=0' '--cmd-duration=59' '--jobs=0'
+/bin/zsh:1> /opt/homebrew/bin/starship prompt --right '--terminal-width=80' '--keymap=' '--status=0' '--pipestatus=0' '--cmd-duration=59' '--jobs=0'

thats output with set -x at the very first line in .zshrc

stepango avatar Aug 17 '22 20:08 stepango

This is really strange... can see from the output that it executes just fine. Given that the warning shows above all this output I think it might be coming from your .zprofile, not your .zshrc. Can you try this again with the set -x line in ~/.zshenv (always sourced first)?

clo4 avatar Aug 18 '22 00:08 clo4

This issue has been automatically closed because there has been no activity for 14 days.

github-actions[bot] avatar Sep 28 '22 18:09 github-actions[bot]