You are not logged in.

#1 2011-01-18 14:51:37

hellnest
Member
From: $ dmesg | grep ATA
Registered: 2010-11-11
Posts: 194
Website

[SOLVED] RPROMPT on ZSH not working

I just choose to use ZSH as my daily Shell, i'm starting to configure it and it have an ability to show a prompt on the right side of terminal. But it doesn't work for me. I try to googling to find this one, but no one have a same problem with me.
Here's the info for the terminal i used and version of zsh

Terminal = rxvt-unicode-patched 9.10-1 X86-64
ZSH          = zsh 4.3.11-1

# utf-8 in the terminal, will break stuff if your term isn't utf aware
LANG=en_US.UTF-8 
LC_ALL=$LANG
LC_COLLATE=C

# Export
export EDITOR="vim"
export VISUAL="vim"
export BROWSER="jumanji"

# Basic Configuration
autoload -U compinit 
autoload -U promptinit
autoload -U colors
autoload -U zrecompile
autoload edit-command-line
autoload -U zmv
compinit
promptinit
colors

REPORTTIME=60       # Report time statistics for progs that take more than a minute to run
WATCH=notme         # Report any login/logout of other users
WATCHFMT='%n %a %l from %m at %T.'

# Prompt
PROMPT='%{$fg_bold[red]%}%n%{$reset_color%} %{$fg_bold[yellow]%}➜%{$reset_color%} %{$fg[magenta]%}%M%{$reset_color%}%# '
RPROMPT='[%F{green}%T%f]'

# Set Option
setopt                          \
        auto_cd                 \
        auto_pushd              \
    append_history        \
        chase_links             \
        noclobber               \
        complete_aliases        \
        extended_glob           \
        hist_ignore_all_dups    \
        hist_ignore_space       \
        ignore_eof              \
        share_history           \
        no_flow_control         \
        list_types              \
        mark_dirs               \
        path_dirs               \
        prompt_percent          \
        prompt_subst            \
        rm_star_wait

# Push a command onto a stack allowing you to run another command first
bindkey '^J' push-line

# History Config
HISTSIZE=1000
SAVEHIST=1000
HISTFILE=~/.zsh_history
eval `dircolors -b`

# Zstyle
zstyle ':completion:*' menu select
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path ~/.zsh/cache
zstyle ':completion:*:match:*' original only
zstyle ':completion:*:approximate:*' max-errors 1 numeric
zstyle ':completion:*' completer _expand _complete _correct _approximate
zstyle ':completion:*' completions 1
zstyle ':completion:*' file-sort name
zstyle ':completion:*' glob 1
zstyle ':completion:*' insert-unambiguous true
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the character to insert%s
zstyle ':completion:*' max-errors 2
zstyle ':completion:*' original true
zstyle ':completion:*' prompt 'correction: %e '
zstyle ':completion:*' squeeze-slashes true
zstyle ':completion:*' substitute 1

# ALIAS
alias fcache='fc-cache -vfs'
alias ..='cd ..'
alias pacman='sudo pacman-color'
alias clyde='sudo clyde'
alias orphan='pacman -Qdt'
alias bb='bauerbill'
alias gensums='[[ -f PKGBUILD ]] && makepkg -g >> PKGBUILD'
alias md5='md5sum'
alias a='aria2c'
alias df='df -h'
alias ls='ls --group-directories-first --color=auto'
alias lsa='ls -a --group-directories-first --color=auto'
alias irc='urxvtc -name irssi -e irssi'
alias idt='urxvtc -name identica -e identicurse'
alias grep='grep --color'
alias nmr='sudo /etc/rc.d/networkmanager restart'
alias sf='screenfetch -s'
alias hset='hsetroot -fill'
alias kfc='killall conky'
alias off='sudo halt'
alias reboot='sudo reboot'
alias mount='sudo mount'
alias umount='sudo umount'
alias usb='mount /dev/sdb /mnt/usb'
alias fm='ranger'
alias nano='vim'
alias v='vim'
alias vs='sudo vim'
alias gcommit='git commit -m'
alias gpush='git push origin'
alias gadd='git add'
alias pid='pgrep'

# Functions
# Compression #
ex() {
  if [ -f $1 ] ; then
      case $1 in
          *.tar.bz2)   tar xvjf $1    ;;
          *.tar.gz)    tar xvzf $1    ;;
          *.bz2)       bunzip2 $1     ;;
          *.rar)       rar x $1       ;;
          *.gz)        gunzip $1      ;;
          *.tar)       tar xvf $1     ;;
          *.tbz2)      tar xvjf $1    ;;
          *.tgz)       tar xvzf $1    ;;
          *.tar.xz)    tar Jxf $1     ;; 
          *.zip)       unzip $1       ;;
          *.Z)         uncompress $1  ;;
          *.7z)        7z x $1        ;;
          *)           echo "don't know how to extract '$1'..." ;;
      esac
  else
      echo "'$1' is not a valid file!"
  fi
}

Last edited by hellnest (2011-01-19 20:38:02)


roll Snapping my own life roll
hmmgithubhmm
coolMyBlogcool

Offline

#2 2011-01-19 14:37:55

hellnest
Member
From: $ dmesg | grep ATA
Registered: 2010-11-11
Posts: 194
Website

Re: [SOLVED] RPROMPT on ZSH not working

I solved it, using this method

export SHELL=/bin/zsh

I don't understand why it happen. I Followed all the guide from wiki but at least it's done. smile


roll Snapping my own life roll
hmmgithubhmm
coolMyBlogcool

Offline

#3 2011-01-19 19:07:24

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: [SOLVED] RPROMPT on ZSH not working

Sounds like your default shell is set to something else; probably bash.  The command that you need to change that would be chsh.   It stands for change login shell.

HTH


Knute

Offline

#4 2011-01-19 20:37:32

hellnest
Member
From: $ dmesg | grep ATA
Registered: 2010-11-11
Posts: 194
Website

Re: [SOLVED] RPROMPT on ZSH not working

Knute wrote:

Sounds like your default shell is set to something else; probably bash.  The command that you need to change that would be chsh.   It stands for change login shell.

HTH

Yeah, i've done that before. But it's done. I guess the problem is because my is is at "/usr/bin/env zsh" not "/usr/bin/zsh" smile and also when trying to mod my root shell, the "CHSH" command point it to "/usr/local/bin/env zsh" i dunno why.

But at least it's solved... forgot to mark it as solved ^^


roll Snapping my own life roll
hmmgithubhmm
coolMyBlogcool

Offline

Board footer

Powered by FluxBB