LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: Disabled
Exclamation Problem with zsh prompt !


hi

i can't set zsh prompt in the config
Code:
# Path to your oh-my-zsh configuration. 
ZSH=$HOME/.oh-my-zsh

# 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.
# ZSH_THEME=""

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

# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"

# Comment this out to disable bi-weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"

# 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
# DISABLE_LS_COLORS="true"

# Uncomment following line if you want to disable autosetting terminal title.
DISABLE_AUTO_TITLE="true"

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

# 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/oh-my-zsh.sh

# Customize to your needs...

unsetopt extendedglob

export PATH=$PATH:$HOME/bin
EDITOR=vim

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

# dir colors
eval `dircolors ~/.dir_colors`

#-- Command Coloring --#
. live-command-coloring.sh

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

ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}["
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""

# title
[[ -t 1 ]] || return
case $TERM in
       *xterm*|*rxvt*|(dt|k|E|a)term)
    preexec () {
    print -Pn "\e]2;$1\a"
    }
    ;;
    screen*)
        preexec () {
        print -Pn "\e\"$1\e\134"             
    }
  ;; 
esac
function precmd() {
	print -Pn "\e]2;%~\a"
}

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

Rep: Reputation: 26
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 oh-my-zsh.sh 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.
Code:
# 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
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,877

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
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 .oh.my.zsh instead of .zshrc. Something like
Code:
ln -s ~/oh-my-zsh.zshrc ~/.zshrc
Here is a thread at unix.stackexchange.com that explains it: http://unix.stackexchange.com/questi...-my-zsh-config
 
Old 04-10-2013, 03:33 PM   #4
Mony
LQ Newbie
 
Registered: Oct 2011
Posts: 3

Original Poster
Rep: Reputation: Disabled

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


Reply


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


All times are GMT -5. The time now is 01:29 PM.

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