Closed luokuning closed 2 years ago
Hmm very strange. Thanks for reporting @luokuning! Would you mind sharing your zshrc
?
Also could you run FIG_LOG_LEVEL=DEBUG
, then in a separate terminal run fig debug logs
and take a screen recording of both terminal sessions.
@mschrage Sorry for the late response, here is my zshrc
content:
#### FIG ENV VARIABLES ####
# Please make sure this block is at the start of this file.
[ -s ~/.fig/shell/pre.sh ] && source ~/.fig/shell/pre.sh
#### END FIG ENV VARIABLES ####
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
#ZSH_THEME="robbyrussell"
#ZSH_THEME="lk"
ZSH_THEME="powerlevel9k/powerlevel9k"
# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion. Case
# sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"
# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13
# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"
# Uncomment the following line to disable auto-setting terminal title.
DISABLE_AUTO_TITLE="true"
function precmd () {
window_title="\033]0;${PWD##*/}\007"
echo -ne "$window_title"
}
# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy"
# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git colored-man-pages colorize github jira vagrant virtualenv npm yarn macos zsh-syntax-highlighting zsh-autosuggestions docker docker-machine docker-compose kubectl fig)
# User configuration
export PATH=$HOME/go/bin:$HOME/bin:/usr/local/bin:$PATH
# export MANPATH="/usr/local/man:$MANPATH"
source $ZSH/oh-my-zsh.sh
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/dsa_id"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
alias startnginx="sudo /usr/local/nginx/sbin/nginx"
alias reloadnginx="sudo /usr/local/nginx/sbin/nginx -s reload"
alias loginms="ssh luokun@173.192.175.13"
alias logindo="ssh root@104.131.157.37"
alias loginls="ssh root@223.223.219.168"
alias edithosts="subl /etc/hosts"
alias getpubip="curl ident.me"
alias gettrace="curl cip.cc"
alias ll="exa -al"
eval $(thefuck --alias)
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
autoload -Uz compinit
compinit
# Completion for kitty
# kitty + complete setup zsh | source /dev/stdin
# alias icat="kitty +kitten icat"
# alias diff="kitty +kitten diff"
# alias xssh="kitty +kitten ssh"
zsh_incognito_icon() {
echo '\ufaf8'
}
POWERLEVEL9K_CUSTOM_INCOGNITO_ICON="zsh_incognito_icon"
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(custom_incognito_icon dir vcs)
export PATH="/usr/local/opt/openjdk/bin:$PATH"
export DENO_INSTALL="/Users/cuishimin/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"
export GITHUB_TOKEN=***
export NPM_TOKEN=***
bindkey \^U backward-kill-line
export PATH="/usr/local/sbin:$PATH"
#### FIG ENV VARIABLES ####
# Please make sure this block is at the end of this file.
[ -s ~/.fig/fig.sh ] && source ~/.fig/fig.sh
#### END FIG ENV VARIABLES ####
and here is the fig debug logs
output when I enter git status
in a new terminal window:
~ fig debug logs ✔ 10007 07:35:04
figterm (70864): [main.c:242] Read 1 chars on stdin
figterm (70864): [main.c:250] read 34 chars on ptyp_fd (2)
figterm (70864): [figterm.c:387] Writing 34 chars to child shell: git status
figterm (70864): [figterm.c:167] Current fg:: indexed 2
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [figterm.c:164] Current fg:: rgb 240, 240, 240
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [figterm.c:164] Current fg:: rgb 240, 240, 240
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [main.c:169] guess: |
index: 0
figterm (70864): [figterm.c:381]
text:
........FIG_LOG_LEVEL=DEBUG .....................
........g......... .....................
cursor pos: 1 10
figterm (70864): [util.c:291] done sending {"hook":{"editBuffer":{"text":"","cursor":"0","context": {"pid":"70872","ttys":"/dev/ttys001","processName":"zsh","sessionId":"w0t0p0:6985FAE4-605C-471F-910A-DB5557EDDDF7","integrationVersion": "5","hostname":"cuishimin@luokundeiMac-3.local"}}}}
figterm (70864): [main.c:242] Read 1 chars on stdin
figterm (70864): [main.c:250] read 30 chars on ptyp_fd (2)
figterm (70864): [figterm.c:387] Writing 30 chars to child shell:gi
figterm (70864): [figterm.c:167] Current fg:: indexed 1
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [figterm.c:167] Current fg:: indexed 1
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [figterm.c:164] Current fg:: rgb 240, 240, 240
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [figterm.c:164] Current fg:: rgb 240, 240, 240
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [figterm.c:164] Current fg:: rgb 240, 240, 240
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [main.c:169] guess: i|
index: 1
figterm (70864): [figterm.c:381]
text:
........FIG_LOG_LEVEL=DEBUG .....................
........gi........ .....................
cursor pos: 1 11
figterm (70864): [util.c:291] done sending {"hook":{"editBuffer":{"text":"i","cursor":"1","context": {"pid":"70872","ttys":"/dev/ttys001","processName":"zsh","sessionId":"w0t0p0:6985FAE4-605C-471F-910A-DB5557EDDDF7","integrationVersion": "5","hostname":"cuishimin@luokundeiMac-3.local"}}}}
figterm (70864): [main.c:242] Read 1 chars on stdin
figterm (70864): [main.c:250] read 33 chars on ptyp_fd (2)
figterm (70864): [figterm.c:387] Writing 33 chars to child shellgit
figterm (70864): [figterm.c:164] Current fg:: rgb 240, 240, 240
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [figterm.c:164] Current fg:: rgb 240, 240, 240
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [figterm.c:167] Current fg:: indexed 2
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [figterm.c:164] Current fg:: rgb 240, 240, 240
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [figterm.c:164] Current fg:: rgb 240, 240, 240
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [figterm.c:167] Current fg:: indexed 2
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [figterm.c:167] Current fg:: indexed 2
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [figterm.c:164] Current fg:: rgb 240, 240, 240
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [main.c:169] guess: it|
index: 2
figterm (70864): [figterm.c:381]
text:
........FIG_LOG_LEVEL=DEBUG .....................
........git....... .....................
cursor pos: 1 12
figterm (70864): [util.c:291] done sending {"hook":{"editBuffer":{"text":"it","cursor":"2","context": {"pid":"70872","ttys":"/dev/ttys001","processName":"zsh","sessionId":"w0t0p0:6985FAE4-605C-471F-910A-DB5557EDDDF7","integrationVersion": "5","hostname":"cuishimin@luokundeiMac-3.local"}}}}
figterm (70864): [main.c:242] Read 1 chars on stdin
figterm (70864): [main.c:250] read 6 chars on ptyp_fd (2)
figterm (70864): [figterm.c:387] Writing 6 chars to child shell:
figterm (70864): [figterm.c:164] Current fg:: rgb 240, 240, 240
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [main.c:169] guess: it |
index: 3
figterm (70864): [figterm.c:381]
text:
........FIG_LOG_LEVEL=DEBUG .....................
........git ...... .....................
cursor pos: 1 13
figterm (70864): [util.c:291] done sending {"hook":{"editBuffer":{"text":"it ","cursor":"3","context": {"pid":"70872","ttys":"/dev/ttys001","processName":"zsh","sessionId":"w0t0p0:6985FAE4-605C-471F-910A-DB5557EDDDF7","integrationVersion": "5","hostname":"cuishimin@luokundeiMac-3.local"}}}}
figterm (70864): [main.c:242] Read 1 chars on stdin
figterm (70864): [main.c:250] read 6 chars on ptyp_fd (2)
figterm (70864): [figterm.c:387] Writing 6 chars to child shell: s
figterm (70864): [figterm.c:164] Current fg:: rgb 240, 240, 240
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [main.c:169] guess: it s|
index: 4
figterm (70864): [figterm.c:381]
text:
........FIG_LOG_LEVEL=DEBUG .....................
........git s..... .....................
cursor pos: 1 14
figterm (70864): [util.c:291] done sending {"hook":{"editBuffer":{"text":"it s","cursor":"4","context": {"pid":"70872","ttys":"/dev/ttys001","processName":"zsh","sessionId":"w0t0p0:6985FAE4-605C-471F-910A-DB5557EDDDF7","integrationVersion": "5","hostname":"cuishimin@luokundeiMac-3.local"}}}}
figterm (70864): [main.c:242] Read 1 chars on stdin
figterm (70864): [main.c:250] read 34 chars on ptyp_fd (2)
figterm (70864): [figterm.c:387] Writing 34 chars to child shell: a
figterm (70864): [figterm.c:164] Current fg:: rgb 240, 240, 240
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [figterm.c:164] Current fg:: rgb 240, 240, 240
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [figterm.c:164] Current fg:: rgb 240, 240, 240
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [figterm.c:164] Current fg:: rgb 240, 240, 240
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [figterm.c:164] Current fg:: rgb 240, 240, 240
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [main.c:169] guess: it sa|
index: 5
figterm (70864): [figterm.c:381]
text:
........FIG_LOG_LEVEL=DEBUG .....................
........git sa .....................
cursor pos: 1 15
figterm (70864): [util.c:291] done sending {"hook":{"editBuffer":{"text":"it sa","cursor":"5","context": {"pid":"70872","ttys":"/dev/ttys001","processName":"zsh","sessionId":"w0t0p0:6985FAE4-605C-471F-910A-DB5557EDDDF7","integrationVersion": "5","hostname":"cuishimin@luokundeiMac-3.local"}}}}
figterm (70864): [main.c:242] Read 1 chars on stdin
figterm (70864): [main.c:250] read 1 chars on ptyp_fd (2)
figterm (70864): [figterm.c:387] Writing 1 chars to child shell: t
figterm (70864): [main.c:169] guess: it sat|
index: 6
figterm (70864): [figterm.c:381]
text:
........FIG_LOG_LEVEL=DEBUG .....................
........git sat .....................
cursor pos: 1 16
figterm (70864): [util.c:291] done sending {"hook":{"editBuffer":{"text":"it sat","cursor":"6","context": {"pid":"70872","ttys":"/dev/ttys001","processName":"zsh","sessionId":"w0t0p0:6985FAE4-605C-471F-910A-DB5557EDDDF7","integrationVersion": "5","hostname":"cuishimin@luokundeiMac-3.local"}}}}
figterm (70864): [main.c:242] Read 1 chars on stdin
figterm (70864): [main.c:250] read 3 chars on ptyp_fd (2)
figterm (70864): [figterm.c:387] Writing 3 chars to child shell:
figterm (70864): [main.c:169] guess: it sa|
index: 5
figterm (70864): [figterm.c:381]
text:
........FIG_LOG_LEVEL=DEBUG .....................
........git sa .....................
cursor pos: 1 15
figterm (70864): [util.c:291] done sending {"hook":{"editBuffer":{"text":"it sa","cursor":"5","context": {"pid":"70872","ttys":"/dev/ttys001","processName":"zsh","sessionId":"w0t0p0:6985FAE4-605C-471F-910A-DB5557EDDDF7","integrationVersion": "5","hostname":"cuishimin@luokundeiMac-3.local"}}}}
figterm (70864): [main.c:242] Read 1 chars on stdin
figterm (70864): [main.c:250] read 26 chars on ptyp_fd (2)
figterm (70864): [figterm.c:387] Writing 26 chars to child shell:tatus
figterm (70864): [figterm.c:164] Current fg:: rgb 240, 240, 240
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [main.c:169] guess: it s|
index: 4
figterm (70864): [figterm.c:381]
text:
........FIG_LOG_LEVEL=DEBUG .....................
........git s..... .....................
cursor pos: 1 14
figterm (70864): [util.c:291] done sending {"hook":{"editBuffer":{"text":"it s","cursor":"4","context": {"pid":"70872","ttys":"/dev/ttys001","processName":"zsh","sessionId":"w0t0p0:6985FAE4-605C-471F-910A-DB5557EDDDF7","integrationVersion": "5","hostname":"cuishimin@luokundeiMac-3.local"}}}}
figterm (70864): [main.c:242] Read 1 chars on stdin
figterm (70864): [main.c:250] read 6 chars on ptyp_fd (2)
figterm (70864): [figterm.c:387] Writing 6 chars to child shell: t
figterm (70864): [figterm.c:164] Current fg:: rgb 240, 240, 240
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [main.c:169] guess: it st|
index: 5
figterm (70864): [figterm.c:381]
text:
........FIG_LOG_LEVEL=DEBUG .....................
........git st.... .....................
cursor pos: 1 15
figterm (70864): [util.c:291] done sending {"hook":{"editBuffer":{"text":"it st","cursor":"5","context": {"pid":"70872","ttys":"/dev/ttys001","processName":"zsh","sessionId":"w0t0p0:6985FAE4-605C-471F-910A-DB5557EDDDF7","integrationVersion": "5","hostname":"cuishimin@luokundeiMac-3.local"}}}}
figterm (70864): [main.c:242] Read 1 chars on stdin
figterm (70864): [main.c:250] read 6 chars on ptyp_fd (2)
figterm (70864): [figterm.c:387] Writing 6 chars to child shell: a
figterm (70864): [figterm.c:164] Current fg:: rgb 240, 240, 240
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [main.c:169] guess: it sta|
index: 6
figterm (70864): [figterm.c:381]
text:
........FIG_LOG_LEVEL=DEBUG .....................
........git sta... .....................
cursor pos: 1 16
figterm (70864): [util.c:291] done sending {"hook":{"editBuffer":{"text":"it sta","cursor":"6","context": {"pid":"70872","ttys":"/dev/ttys001","processName":"zsh","sessionId":"w0t0p0:6985FAE4-605C-471F-910A-DB5557EDDDF7","integrationVersion": "5","hostname":"cuishimin@luokundeiMac-3.local"}}}}
figterm (70864): [main.c:242] Read 1 chars on stdin
figterm (70864): [main.c:250] read 6 chars on ptyp_fd (2)
figterm (70864): [figterm.c:387] Writing 6 chars to child shell: t
figterm (70864): [figterm.c:164] Current fg:: rgb 240, 240, 240
figterm (70864): [figterm.c:167] Suggestion fg:: indexed 8
figterm (70864): [main.c:169] guess: it stat|
index: 7
figterm (70864): [figterm.c:381]
text:
........FIG_LOG_LEVEL=DEBUG .....................
........git stat.. .....................
cursor pos: 1 17
figterm (70864): [util.c:291] done sending {"hook":{"editBuffer":{"text":"it stat","cursor":"7","context": {"pid":"70872","ttys":"/dev/ttys001","processName":"zsh","sessionId":"w0t0p0:6985FAE4-605C-471F-910A-DB5557EDDDF7","integrationVersion": "5","hostname":"cuishimin@luokundeiMac-3.local"}}}}
Hey @luokuning! It looks like all of the editbuffer events are missing the first character.
Rather than seeing git status
, the autocomplete engine is receiving it status
. Since there is no completions spec for "it", no suggestions are displayed.
This likely is the result of an incompatibility with your prompt or another shell integration.
Can you try commenting out the iTerm integration and see if the issues persists? Also try switching your zsh theme back to robbyrussell
Hi @mschrage, Thanks for commenting out the sensitive message in my zshrc
😄. After replacing my zsh theme with robbyrussell
, everything just works well! So I guess maybe powerlevel9k
or powerlevel10k
(I also tried this one) has some compatibility issues with Fig in some way.
Any way, my problem is solved for now, so I'll just close this issue. Thanks again!
Sanity checks
fig doctor
in the affected terminal sessionIssue Details
Description:
I don't know what's going on. Is there something wrong with my configuration?
Environment