You are not logged in.
Hi! My computer boots in runlevel 3 and if I start the wm I use the urxvt terminal. In both cases, if a command exceeds the line width, instead of continuing in the next line, it starts rewriting the current one. Even worse are the cases of accessing a large command via the history... then, the printed letters do not correspond to the "actual" ones! So if i need to make a correction, I either have to count the freaking spaces(!!!) or dump it and rewrite the whole command.
in urxvt:
echo $TERM
rxvt-unicode-256color
and in tty:
echo $TERM
linux
Anyone have any ideas?
I thank you in advance!
Last edited by stamoulohta (2013-12-11 22:13:54)
// TODO fix this.
Offline
Go into .bashrc or .zshrc and comment out your PS1 or PROMPT entries and see if you still have the problems.
Edit: There is also something called "shopt -s checkwinsize" you can set in .bashrc that may help
Last edited by dodo3773 (2013-12-11 21:22:50)
Offline
Hey dodo3773!
You are right. Disabling the custom prompts in my .bashrc did the trick! But... I really did like my prompts. Was there something wrong in particular with them?
~/.bashrc
PS1='[\u@\h \W]\$ '
/etc/bash.bashrc
function get_prompt {
eXITSTATUS="$?"
oFF="\e[0m"
hOST="\h"
dIR="\e[1;97m\W${oFF}"
if [ $UID -eq 0 ]; then
uSER="\e[0;31m\u"
PS2="\e[0;31m-> ${oFF}"
else
uSER="\e[0;32m\u"
PS2="\e[0;32m-> ${oFF}"
fi
if [ $eXITSTATUS -gt 0 ]; then
eXITSTATUS="\e[1;41m:(\e[0;49m "
else
eXITSTATUS=""
fi
PS1="${eXITSTATUS}${uSER}${oFF}@${hOST} ${dIR} $ "
}
PROMPT_COMMAND=get_prompt
PS3='-> '
PS4='+ '
PS: that "shopt" command doesn't have a man page and/or a --help switch... Let's see what happens!!
Edit: nope, it doesn't make any noticeable difference.
Last edited by stamoulohta (2013-12-11 21:48:45)
// TODO fix this.
Offline
Maybe this helps:
http://stackoverflow.com/questions/1977 … tom-prompt
Maybe something is not getting escaped correctly.
Offline
Maybe this helps:
http://stackoverflow.com/questions/1977 … tom-prompt
Maybe something is not getting escaped correctly.
Yes. Also see this topic: https://bbs.archlinux.org/viewtopic.php … 4#p1357714
Last edited by 2ManyDogs (2013-12-11 22:01:48)
Offline
That's it!
Thank you for your help guys! Cheers!
Last edited by stamoulohta (2013-12-11 22:06:09)
// TODO fix this.
Offline
You are welcome. Happy to help.
Sidenote: If you are in a shell a lot you may want to give zsh a spin to see if you like it.
Offline