You are not logged in.
Pages: 1
Topic closed
I am using zsh and urxvt and whenever I type a command, the command is repeated like so:
╭─james@pc ~
╰─$ test
test%
It's not annoying for the example above, but for commands with output, it doesn't put a new line after the command, so for example, a command like ls:
╭─james@pc ~
╰─$ ls
lsDesktop dotfiles Downloads pictures projects revision scripts
I cannot work out what is causing it, let alone how to stop it.
One thing I did notice, it will print the command once for every time I haved sourced my zshrc in the current terminal's lifetime. It's a bit easier to show than explain:
╭─james@pc ~
╰─$ echo "fresh"
echofresh
╭─james@pc ~
╰─$ source .zshrc
source%
╭─james@pc ~
╰─$ echo "once"
echoechoonce
╭─james@pc ~
╰─$ source .zshrc
sourcesource%
╭─james@pc ~
╰─$ echo "twice"
echoechoechotwice
Here's my zshrc, if you need any other information please ask.
# Options
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
ZSH=/usr/share/oh-my-zsh/
ZSH_THEME="bira"
DISABLE_AUTO_UPDATE="true"
plugins=(git)
setopt noflowcontrol
setopt appendhistory extendedglob
unsetopt beep nomatch notify
# Keybindings
typeset -g -A key
bindkey '^?' backward-delete-char # Backspace
bindkey '^[[2~' overwite-mode # Insert
bindkey '^[[3~' delete-char # Delete
bindkey '^[[7~' beginning-of-line # Home
bindkey '^[[8~' end-of-line # End
bindkey '^S' insert-sudo
# Vars
export EDITOR="gvim"
export JAVA_HOME=/usr/lib/jvm/java-7-jdk/jre/
export USER_SCRIPTS=$HOME/dotfiles/scripts
export PATH=$PATH:$USER_SCRIPTS
# Colours
export WHITE=#C5C8C6
export BLACK=#1D1F21
export DARK_GRAY=#373B41
export LIGHT_GRAY=#969896
export RED=#CC6666
export ORANGE=#DE935F
export YELLOW=#F0C674
export GREEN=#B5BD68
export AQUA=#8ABEB7
export BLUE=#81A2BE
export PURPLE=#B294BB
# Misc
# Function for inserting sudo at the start of the line
insert_sudo() {
if [[ $BUFFER != "sudo "* ]]; then
BUFFER="sudo $BUFFER"
CURSOR+=5
fi
}
zle -N insert-sudo insert_sudo
# Hooks
source /usr/share/doc/pkgfile/command-not-found.zsh
source /usr/share/oh-my-zsh/oh-my-zsh.sh
Last edited by Lerp (2015-01-10 19:45:04)
Offline
And with a different zshrc do you see this happen? If not, just start subdividing your zshrc until you figure out which line causes the problem.
Your prompt isn't set there, where do you set the prompt?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Your prompt isn't set there, where do you set the prompt?
It's set in the zsh theme file, I tried several different themes and it happens with any.
Offline
Ok. What about the rest of my post?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I've seen this behavior when locale and/or terminfo settings are incorrect. A couple ideas:
- See if this persists when using Bash. If it does, it's probably the terminfo settings.
- See if this persists when not using Oh My Zsh, or maybe just move your ~/.zshrc to ~/.zshrc_bak. If not using Oh My Zsh clears things up, then OMZ might be setting some environment variable that's causing the problem.
In each case, check the output of "locale" and "echo $TERM:"
» locale
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_ALL=
» echo $TERM
rxvt-unicode-256color
Offline
Oh-my-zsh is an excruciating ratmangle in terms of both concept and execution; installing it is a recipe for exactly this sort of brokeness and bewilderment.
Offline
Ok. What about the rest of my post?
Sorry got side tracked.
- See if this persists when using Bash. If it does, it's probably the terminfo settings.
Everything works fine when I use bash.
- See if this persists when not using Oh My Zsh, or maybe just move your ~/.zshrc to ~/.zshrc_bak. If not using Oh My Zsh clears things up, then OMZ might be setting some environment variable that's causing the problem.
I disabled the oh-my-zsh hook and it stopped so it definitely is oh-my-zsh.
I was only using it for the themes so I'm happy to not use it. For completeness here's my $TERM and locale output.
pc% echo $TERM
screen-256color
pc% locale
LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME=en_GB.UTF-8
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=
Offline
Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.
Offline
Sorry for necroposting, recently I encountered same problem. I've solved it without disabled oh-my-zsh plugin. Setting URxvt*termName to 'rxvt' helped
Offline
Closing this old thread.
Offline
Pages: 1
Topic closed