Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-10-2013, 01:47 PM   #1
LQ Newbie
Registered: Oct 2011
Posts: 3

Rep: Reputation: Disabled
Exclamation Problem with zsh prompt !


i can't set zsh prompt in the config
# Path to your oh-my-zsh configuration. 

# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.

# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"

# Set to this to use case-sensitive completion

# Comment this out to disable bi-weekly auto-update checks

# Uncomment to change how many often would you like to wait before auto-updates occur? (in days)
# export UPDATE_ZSH_DAYS=13

# Uncomment following line if you want to disable colors in ls

# Uncomment following line if you want to disable autosetting terminal title.

# Uncomment following line if you want red dots to be displayed while waiting for completion

# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git archlinux extract themes)

source $ZSH/

# Customize to your needs...

unsetopt extendedglob

export PATH=$PATH:$HOME/bin

[ ! "$UID" = "0" ] && fortune | cowsay -f eyes

# dir colors
eval `dircolors ~/.dir_colors`

#-- Command Coloring --#

# Prompt
PROMPT="%{$fg[white]%}%~%{$reset_color%} $(git_prompt_info)\
%{$fg[cyan]%}>%{$fg[white]%}>%{$fg[blue]%}>%{$reset_color%} "

ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}"

# title
[[ -t 1 ]] || return
case $TERM in
    preexec () {
    print -Pn "\e]2;$1\a"
        preexec () {
        print -Pn "\e\"$1\e\134"             
function precmd() {
	print -Pn "\e]2;%~\a"

# Misc
w3mimg () { w3m -o imgdisplay=/usr/lib/w3m/w3mimgdisplay $1 }
my prompt should be like this
~ <git>
but it look like this
mony@PC ~ (git)-[master] %
"grml prompt"
Old 04-10-2013, 03:10 PM   #2
Registered: May 2012
Location: San Luis, Argentina
Distribution: Debian
Posts: 204

Rep: Reputation: 27
If I am not mistaken, you are using ArchLinux, am I correct?
In this link you can find very useful information on Customizing your zsh prompt (official ArchWiki).
Also, since oh-my-zsh is a plugin and theme system for zsh and it's available in Github here, you can download the file named and tweak it a little. Hopefully you will get the desired results.
You may especially want to take a look at $(git_prompt_info) in it.
# Prompt
PROMPT="%{$fg[white]%}%~%{$reset_color%} $(git_prompt_info)\
%{$fg[cyan]%}>%{$fg[white]%}>%{$fg[blue]%}>%{$reset_color%} "
Hope this helps. If so, please mark this thread as solved, or feel free to ask any other questions you may have.
Old 04-10-2013, 03:17 PM   #3
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,898

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Since zsh uses .zshrc (similar to .bashrc in bash) to set the PS1 (prompt) variable, you probably need to do something to tell zsh to use instead of .zshrc. Something like
ln -s ~/oh-my-zsh.zshrc ~/.zshrc
Here is a thread at that explains it:
Old 04-10-2013, 03:33 PM   #4
LQ Newbie
Registered: Oct 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled

Thanks guys
just removed the "grml-zsh-config" package


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] ZSH - PATH problem when using script via udev rule Shark82 Linux - Software 4 11-08-2012 08:14 AM
[SOLVED] Make Bash prompt look like Windows C:\ prompt -- *PROBLEM* arkadios Linux - General 5 07-24-2012 12:29 PM
zsh prompt : jobs shell wiliamvw Linux - Software 3 05-11-2011 09:25 AM
Zsh: Help Setting Prompt, Please CoderMan Linux - Software 1 02-05-2010 03:34 AM
passing parameters from a unix shell prompt into a windows cmd.exe prompt nano2 Programming 1 09-01-2009 12:26 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:55 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration