Open miohtama opened 2 years ago
The workaround is not to set RPROMPT
if we detect Warp the terminal:
# Work around Warp terminal issues
# https://github.com/warpdotdev/Warp/issues/936
if [[ "$WARP_USE_SSH_WRAPPER" == "" ]] ; then
RPROMPT=`echo -ne "%{\033[A%}%B[%{\033[${PROMPT_USER_COLOR:-1;33}m%}%n%{\033[0m%}%B@%{\033[${PROMPT_HOST_COLOR:-1;33}m%}$PROMPT_HOSTNAME%b%B][%{\033[1;32m%}%T%b%B]%{\033[B%}"`
fi
Alternatively hit ctrl+c
and it will move to the correct position if its in the RPROMPT
area but not ideal to do after every command
Sorry for this folks! We still have trouble with right sided prompts!
From @KieranP via #846
When I try to use starship right prompt setting, it doesn't display. Instead, Warp is adding a strange invisible character at the start of the second line.
Install starship and configure with:
format = "$directory$git_branch$git_metrics$git_status"
right_format = "$ruby$nodejs"
Ruby and Node info would be on the right side of the prompt
No response
MacOS
12.3
No response
From @sullimander via #838
I have a `fish_right_prompt` setup. In other terminals, the right prompt appears to the right of the main `fish_prompt` and the input is between them. In Warp, the `fish_right_prompt` only appears after hitting enter on a command.
Steps to reproduce:
Create a functions/fish_prompt.fish
file with something similar to the following:
function fish_prompt
set last_status $status
set_color yellow
echo -n "("(git config user.email)")"
set_color cyan
echo -n "("(prompt_pwd)")"
# Print command duration
if test $CMD_DURATION; and test $CMD_DURATION != 0
set duration $CMD_DURATION
set_color green
# Show duration of the last command in seconds
if test $CMD_DURATION -gt 1000
set_color yellow
set duration (echo "$duration 1000" | awk '{printf "%.3fs", $1 / $2}')
end
if test $CMD_DURATION -gt 10000
set_color red
end
echo -n "($duration)"
end
set_color red
switch $last_status
case 0
set_color green
end
echo -n "\$ "
set_color normal
end
Create a functions/fish_right_prompt.fish
with something similar to the following
function fish_right_prompt
# Git prompt
set_color green
fish_git_prompt
# rbenv version
set_color cyan
echo -n "("(rbenv version-name)")"
# vim mode indicator
switch $fish_bind_mode
case default
set_color red
echo -n '(N)'
case insert
set_color yellow
echo -n '(I)'
case replace_one
set_color yellow
echo -n '(R)'
case visual
set_color brmagenta
echo -n '(V)'
case '*'
set_color red
echo -n '(?)'
end
end
Compare to the screenshots in this ticket
The `fish_right_prompt` should appear on the right side of the prompt line.
fish_right_prompt
on Warp (v0.2022.03.23.22.10.stable_01)fish_right_prompt
on iTerm 2 (Build 3.5.0beta5)MacOS
12.3
No response
From @rcousens via #1159
No response
Launch warp, using tide prompt and fisher with fish shell. I have a right side as part of my prompt that for whatever reason is not overridden by warp. Regardless, it shows what it normally does in fish, however it is "stuck in time". I.e. the time never updates.
My preference would be if you're going to override the prompt then clear out the right side prompt for fish (fish_right_prompt, see https://fishshell.com/docs/current/cmds/fish_right_prompt.html)
Open warp
No response
MacOS
12.3.1
No response
zsh takes too long to start in warp
has anyone seen this error or knows how to solve it? I recently switch to warp from zsh+fig and it's giving me a bit of trouble.
.zshrc
# Fig pre block. Keep at the top of this file.
[[ -f "$HOME/.fig/shell/zshrc.pre.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.pre.zsh"
eval $(thefuck --alias)
alias ll="exa --icons --group-directories-first --all --long --no-user"
alias l="exa --icons --group-directories-first --all --long --no-user"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# bun completions
[ -s "/Users/a3tech/.bun/_bun" ] && source "/Users/a3tech/.bun/_bun"
# Bun
export BUN_INSTALL="/Users/a3tech/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
# pnpm
export PNPM_HOME="/Users/a3tech/Library/pnpm"
export PATH="$PNPM_HOME:$PATH"
# pnpm end
# EdgeDB
fpath+=~/.zfunc
# Poetry stuff
export PATH="/Users/a3tech/Library/Python/3.10/bin:$PATH"
# Starship prompt
eval "$(starship init zsh)"
# Fig post block. Keep at the bottom of this file.
[[ -f "$HOME/.fig/shell/zshrc.post.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.post.zsh"
I would say disable everything that isn't an alias or export, especially the completions: Fig, NVM:
You can also disable parts of your dotfiles just for Warp by using this conditional statement:
if [[ $TERM_PROGRAM != "WarpTerminal" ]]; then
##### WHAT YOU WANT TO DISABLE FOR WARP - BELOW
# Whatever you want to disable
##### WHAT YOU WANT TO DISABLE FOR WARP - ABOVE
fi
See our documentation here: https://docs.warp.dev/help/known-issues#debugging
--- original message --- On September 30, 2022 at 10:38 AM EDT @.*** wrote:
zsh takes too long to start in warp has anyone seen this error or knows how to solve it? I recently switch to warp from zsh+fig and it's giving me a bit of trouble.
.zshrc
[[ -f "$HOME/.fig/shell/zshrc.pre.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.pre.zsh" eval $(thefuck --alias)
alias ll="exa --icons --group-directories-first --all --long --no-user" alias l="exa --icons --group-directories-first --all --long --no-user"
export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion" # This loads nvm bash_completion
[ -s "/Users/a3tech/.bun/_bun" ] && source "/Users/a3tech/.bun/_bun"
export BUN_INSTALL="/Users/a3tech/.bun" export PATH="$BUN_INSTALL/bin:$PATH"
export PNPM_HOME="/Users/a3tech/Library/pnpm" export PATH="$PNPM_HOME:$PATH"
fpath+=~/.zfunc
export PATH="/Users/a3tech/Library/Python/3.10/bin:$PATH"
eval "$(starship init zsh)"
[[ -f "$HOME/.fig/shell/zshrc.post.zsh" ]] && builtin source "$HOME/.fig/shell/zshrc.post.zsh"
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- You received this message because you are subscribed to the Google Groups "github" group. To unsubscribe from this group and stop receiving emails from it, send an email to @.*** --- end of original message ---
I am using Oh My Zsh and switching to the default theme solved the issue.
if [[ $TERM_PROGRAM != "WarpTerminal" ]]; then
ZSH_THEME="avit"
else
ZSH_THEME="robbyrussell"
fi
Hey all - a fix for this will be going live in this week's release. Sorry for the issues!
Is there any news about the fix?
A fix for the issue was submitted back in November; can you give more details about what you are experiencing?
It would be helpful if you could provide:
Discord username (optional)
No response
Describe the bug
If you have a ZSH prompt that sets the prompt widget to the right edge of the screen (
RPROMPT
) Warp gets confused. The block editor does not start the text edit cursor on a new line, but at the right edge of the screen. Then it sets the clock text as the text that appears on the command line.About RPROMPT.
To Reproduce
Steps to reproduce:
.zshrc
file with the following contentNote that this does not to seem to happen if you do this on a remote server, or you open a new shell within the existing zsh session. But in this case, the block editing does not work either.
Expected behaviour
Screenshots
Warp (see how it picks the clock text as the command at the first block):
iTerm:
Operating System
MacOS
OS Version
Big Sur
Additional context
No response