You are not logged in.

#1 2018-04-15 09:58:18

vogondude
Member
Registered: 2018-04-15
Posts: 1

zsh shell not interpreting usernames correctly

Hello all,

I am fairly new to arch. I have used Manjaro before but this is my first ever full blown arch installation.

I was trying to setup zsh and it is acting up.

In bash, an empty terminal looks like this.

[naman@GooglePlex_StarThinker ~]$

when I type zsh to invoke the zsh shell, zsh interprets my username and hostname as

[\[\]\[\][\[\]\u\[\]@\[\]\h \[\]\W\[\]]\[\]\$ \[\]

My

~/.zshrc

file is empty with a comment and this is a fresh copy of zsh

and my

locale.conf

contains

LANG=en_US.UTF-8

only

Ideally I'd like zsh to have me display the username and hostname same as in bash shelll. Could anyone guide me in what am I missing? 

Thanks

Last edited by vogondude (2018-04-15 17:43:31)

Offline

#2 2018-04-15 10:23:16

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,435

Re: zsh shell not interpreting usernames correctly

Please convert that image to an URL and even better, don't post text as images but paste the actual text: https://wiki.archlinux.org/index.php/Co … s_and_code

Offline

#3 2018-04-15 10:26:40

robg
Member
Registered: 2015-03-05
Posts: 225

Re: zsh shell not interpreting usernames correctly

Hello vogondude and welcome to Arch.

Please make sure to get familiar with the Code of Conduct and make sure your screenshot is within the allowed size limit. Next, if you want anyone to help you, you'll first have to do some work yourself. At the very least, post _all_ the relevant (check the wiki if you are unsure about the scope of "relevant") details of your setup: What terminal emulator, its configuration, your .zshrc, fonts, locale, etc.

Offline

#4 2018-04-15 11:38:34

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,543
Website

Re: zsh shell not interpreting usernames correctly

Also, giving us a hint at what "acting up" is would be helpful.  I can only assume you are surprised by what your prompt looks like.  You shouldn't be, zsh is not bash and it does not use the same format for custom prompts:
http://zsh.sourceforge.net/Doc/Release/ … -Expansion


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#5 2018-04-17 22:06:17

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,718
Website

Re: zsh shell not interpreting usernames correctly

Thanks for editing your post as requested.

It seems that you simply need to configure your zsh. That prompt you see is how zsh interprets the $PS1 environment variable from your bash configuration.

See https://wiki.archlinux.org/index.php/Zsh#Configure_Zsh for basic configuration tips, and the man pages/external links for more advanced configuration.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB