From: "Renato Botelho" <rbgarga@gmail.com>
To: zsh-workers@sunsite.dk
Subject: Completion damaging prompt
Date: Fri, 9 May 2008 09:51:20 -0300 [thread overview]
Message-ID: <747dc8f30805090551j3d26f810ud868028403ab8d9f@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 746 bytes --]
Hello,
I'm using zsh 4.3.6 at FreeBSD 7.0, and I noted a problem with prompt
in some cases,
following is an example
garga@botelhor:~> sudo su
root@botelhor:/home/garga#
root@botelhor:/home/garga# pkg<TAB>
When I press TAB, prompt's changed
root@botelhor:/home/gapkg
external command
pkg-config pkg_add pkg_delete pkg_info pkg_updating pkgdb
pkg-orphan pkg_create pkg_fetch pkg_sort pkg_version
pkg-stash pkg_deinstall pkg_glob pkg_tree pkg_which
local directory
pkgs/
And if I clear the screen using ^L prompt changes to ~garga
root@botelhor:~garga#
Is it sound like a problem of zsh or maybe a configuration problem?
Attached is my zshrc
Thanks in advance
--
Renato Botelho
[-- Attachment #2: zshrc --]
[-- Type: application/octet-stream, Size: 3496 bytes --]
#
# .zshrc ( Otávio Fernandes )
#
#
# Allow one error for every three characters typed in approximate completer
#
zstyle -e ':completion:*:approximate:*' max-errors \
'reply=( $(( ($#PREFIX+$#SUFFIX)/3 )) numeric )'
#
# Insert all expansions for expand completer
#
zstyle ':completion:*:expand:*' tag-order all-expansions
#
# Formatting and messages
#
zstyle ':completion:*' verbose yes
zstyle ':completion:*:descriptions' format '%B%d%b'
zstyle ':completion:*:messages' format '%d'
zstyle ':completion:*:warnings' format 'No matches for: %d'
zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b'
zstyle ':completion:*' group-name ''
# match uppercase from lowercase
zstyle ':completion:*' matcher-list 'm:{# a-z}={# A-Z}'
# offer indexes before parameters in subscripts
zstyle ':completion:*:*:-subscript-:*' tag-order indexes parameters
#
# Command for process lists, the local web server details and host completion
#
# zstyle ':completion:*:processes' command 'ps -o pid,s,nice,stime,args'
# zstyle ':completion:*:urls' local 'www' '/var/www/htdocs' 'public_html'
zstyle '*' hosts $hosts
# Filename suffixes to ignore during completion (except after rm command)
zstyle ':completion:*:*:(^rm):*:*files' ignored-patterns '*?.o' '*?.c~' '*?.old' '*?.pro'
# the same for old style completion
#fignore=(.o .c~ .old .pro)
# ignore completion functions (until the _ignored completer
# zstyle ':completion:*:functions' *ignored-patterns* ' '
autoload -U compinit
compinit
HISTFILE=~/.histfile
HISTSIZE=5000
SAVEHIST=1000
export LISTMAX=1000
export EDITOR=vim
export NULLFS=1
export JAIL=/var/jail/data
export GPG_TTY=`tty`
#
# Vi Mode
#
bindkey -v
bindkey -M vicmd "j" history-search-forward
bindkey -M vicmd "k" history-search-backward
bindkey "^[[A" history-search-backward
bindkey "^[[B" history-search-forward
bindkey -M viins "^[[S" insert-last-word
bindkey -M viins "^[[18~" insert-last-word
#
# Aliasing
#
alias more='less'
alias ftp='ncftp'
alias j='jobs -l'
alias ff='find ./ -iname $*'
alias ps='ps auxww'
alias l='ls -lF'
alias ls='ls -F'
alias vi='vim'
alias l.='ls -dF .*'
alias gvim="/usr/local/bin/gvim -geom 145x60 -font \"Terminus 7\""
alias ...='cd ../..'
alias sbp='ssh -l bpuser $*'
alias sgn='ssh -l gnuser $*'
alias dcvs='env CVS_RSH=ssh cvs -d garga@dcvs.FreeBSD.org:/home/dcvs'
alias pcvs='env CVS_RSH=ssh cvs -d garga@pcvs.FreeBSD.org:/home/pcvs'
alias projcvs='env CVS_RSH=ssh cvs -d garga@projcvs.FreeBSD.org:/home/projcvs'
alias scvs='env CVS_RSH=ssh cvs -d garga@ncvs.FreeBSD.org:/home/ncvs'
alias bpcvs='CVS_RSH=ssh && cvs -d garga@cvs:/share/cvs/BluePex'
if [ "$LOGNAME" = "root" ]; then
alias mutt='/usr/bin/env LC_ALL=en_US.ISO8859-1 mutt -y'
else
alias mutt='/usr/bin/env LC_ALL=en_US.ISO8859-1 mutt'
fi
#
# Shell functions
#
setenv() { typeset -x "${1}${1:+=}${(@)argv[2,$#]}" } # csh compatibility
freload() { while (( $# )); do; unfunction $1; autoload -U $1; shift; done }
#
# Command Prompt
#
PROMPT='%n@%B%m%b:%~%(#.#.>) '
#
# Completion options
#
setopt notify globdots pushdtohome cdablevars autolist
setopt autocd recexact longlistjobs NO_BEEP
setopt autoresume histignoredups pushdsilent noclobber
setopt autopushd pushdminus extendedglob rcquotes mailwarning
unsetopt bgnice autoparamslash listambiguous
#
# Changing XTerm Title
#
case $TERM in
xterm*)
precmd () { print -Pn "\e]0;%n@%m: %~\a"}
;;
esac
#
# bsd games
#
[ -x /usr/games/fortune ] && \
/usr/games/fortune -s && \
echo ""
next reply other threads:[~2008-05-09 12:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-09 12:51 Renato Botelho [this message]
2008-05-09 13:06 ` Peter Stephenson
2008-05-09 14:41 ` Bart Schaefer
2008-05-09 16:40 ` Renato Botelho
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=747dc8f30805090551j3d26f810ud868028403ab8d9f@mail.gmail.com \
--to=rbgarga@gmail.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).