You are not logged in.
Pages: 1
Hi all, first post here.
I recently installed Arch for my second time, and my bash prompt is ... off.
I went into my .bashrc and commented out my PS1, and that didn't help. Here's what shows up:
\u009D0;USERNAME@HOSTNAME:~\u009C\u009D7;file://HOSTNAME/home/USERNAME\u009C[USERNAME@HOSTNAME ~]$
Here's my .bashrc:
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
#green=$(tput setaf 2)
#blue=$(tput setaf 4)
#bold=$(tput bold)
#reset=$(tput sgr0)
#PS1="\n\[$green$bold\]\h\[$reset\]:\[$blue$bold\]\w\[$reset\]\$ "I've tried search engines, and they have failed me.
Any ideas?
Last edited by theKeen (2018-09-23 20:08:54)
Offline
Please use code tags when pasting to the boards: https://wiki.archlinux.org/index.php/Co … s_and_code
Offline
Please post your ~/.bash_profile and the outout of `pacman -Qkk bash`.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
bash_profile:
#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc`pacman -Qkk bash`:
bash: 235 total files, 0 altered filesOffline
The output of `echo $PS1` please
Offline
`echo $PS1`:
[\u@\h \W]$ Offline
and `echo $PROMPT_COMMAND`? I suspect you have the wrong TERM settings so the title is comming out on the comand line rather than the window title.
Last edited by Trilby (2018-09-23 19:54:43)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
By the way, sorry for taking so long to reply. I'm a bit busy right now, but replies should be relatively quick from now on.
Offline
`echo $PROMPT_COMMAND`:
__vte_prompt_command; printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"I think you've found the error.
Offline
Okay, I solved the problem.
I simply added the line
PROMPT_COMMAND=""to my .bashrc file, and all is good!
Thanks for your help, everyone.
Offline
That's a decent workaround - but you'd be far better off figuring out what is *causing* the problem as it may cause other problems down the line.
Are you using some shell configuration package, plugin, or extension - or did you copy and paste someone elses configs?
Last edited by Trilby (2018-09-23 20:33:33)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
"__vte_prompt_command;" - I'm gonna say the VTE. Try in eg. xterm.
Offline
Yup - I wasn't thinking this at first as I hadn't realized that /etc/bash.bashrc only appends to PROMPT_COMMAND (rather than setting it). But still, I can't imagine a VTE would set a prompt command that would not work with that VTE. So I gather TERM is being set somewhere such that it breaks the way the VTE title is set.
Last edited by Trilby (2018-09-23 22:21:13)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Pages: 1