PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.unix.shell > Zsh completion always includes home directory
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.unix.shell Using and programming the Unix shell.

Zsh completion always includes home directory

Réponse
 
LinkBack Outils de la discussion
Vieux 31/07/2007, 09h32   #1
Trans
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Zsh completion always includes home directory

Hi--

No matter what directory I'm in, when I use tab completion, Zsh will
include my home directory in the list. It's driving me nuts. Why would
it do that when I can just use ~ to get home? Anyway, can anyone tell
me what to add to my .zshrc file to get it to stop.

(P.S. I'm running Arch Linux, but the completion code I'm currently
using is almost a straight copy from GoboLinux).

Thanks,
T.

  Réponse avec citation
Vieux 31/07/2007, 09h34   #2
Erik Max Francis
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Zsh completion always includes home directory

Trans wrote:

> No matter what directory I'm in, when I use tab completion, Zsh will
> include my home directory in the list. It's driving me nuts. Why would
> it do that when I can just use ~ to get home? Anyway, can anyone tell
> me what to add to my .zshrc file to get it to stop.
>
> (P.S. I'm running Arch Linux, but the completion code I'm currently
> using is almost a straight copy from GoboLinux).


This certainly isn't the way it normally behaves. You've done something
(inadvertently, obviously) to cause this. You'll have to indicate what
you're doing in order to determine what.

--
Erik Max Francis && max@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis
Fear is an emotion indispensible for survival.
-- Hannah Arendt
  Réponse avec citation
Vieux 31/07/2007, 09h34   #3
Erik Max Francis
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Zsh completion always includes home directory

Trans wrote:

> No matter what directory I'm in, when I use tab completion, Zsh will
> include my home directory in the list. It's driving me nuts. Why would
> it do that when I can just use ~ to get home? Anyway, can anyone tell
> me what to add to my .zshrc file to get it to stop.
>
> (P.S. I'm running Arch Linux, but the completion code I'm currently
> using is almost a straight copy from GoboLinux).


This certainly isn't the way it normally behaves. You've done something
(inadvertently, obviously) to cause this. You'll have to indicate what
you're doing in order to determine what.

--
Erik Max Francis && max@alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis
Fear is an emotion indispensible for survival.
-- Hannah Arendt
  Réponse avec citation
Vieux 31/07/2007, 09h57   #4
Trans
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Zsh completion always includes home directory

On Jul 31, 1:34 am, Erik Max Francis <m...@alcyone.com> wrote:
> Trans wrote:
> > No matter what directory I'm in, when I use tab completion, Zsh will
> > include my home directory in the list. It's driving me nuts. Why would
> > it do that when I can just use ~ to get home? Anyway, can anyone tell
> > me what to add to my .zshrc file to get it to stop.

>
> > (P.S. I'm running Arch Linux, but the completion code I'm currently
> > using is almost a straight copy from GoboLinux).

>
> This certainly isn't the way it normally behaves. You've done something
> (inadvertently, obviously) to cause this. You'll have to indicate what
> you're doing in order to determine what.
>
> --
> Erik Max Francis && m...@alcyone.com &&http://www.alcyone.com/max/
> San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis
> Fear is an emotion indispensible for survival.
> -- Hannah Arendt


Thanks. Okay, here's my .zshrc

################## ZSH OPTIONS ##################
setopt auto_cd
setopt cd_able_vars
setopt extended_glob
setopt correct
setopt check_jobs
setopt multios
setopt no_beep

autoload -U zmv
autoload -U colors && colors

umask 022
#################################################


################## VARIABLES ####################
path=($path ~/bin)
cdpath=(~/mp3)

for color in white red green blue yellow; do
eval $color='%{$terminfo[bold]$fg[${color}]%}'
done
nocolor="%{$terminfo[sgr0]%}"

export EDITOR="vim"
#export OOO_FORCE_DESKTOP="gnome"
#export WM="fvwm-crystal"
#################################################


################## ALIASES ######################
case $OSTYPE in
linux*)
alias ls='ls -h --color=always'
;;

freebsd*)
alias ls='ls -Gh'
alias pkg_delete='pkg_delete -drv'
alias portaudit-get='portaudit -Fd'
alias portupdate='cvsup -L 2 /etc/ports-supfile'
alias poweroff='shutdown -p now'
;;
esac

alias .='source'
alias backup-daily='sysbkp -si -ui'
alias backup-weekly='sysbkp -sf -uf'
alias df='df -h'
alias du='du -h'
alias file-sgid="print -c /**/*(S)"
alias file-suid="print -c /**/*(s)"
alias la='ls -a'
alias ll='ls -l'
alias lla='ls -la'
alias vi="vim"
#################################################


################# FUNCTIONS ######################
_force_rehash()
{
(( CURRENT == 1 )) && rehash
return 1
}
#-----------------------
if_not_loaded()
{
module=$(zmodload -L | grep $1)

if [[ -z $module ]]; then
return 0
else
return 1
fi
}
#-----------------------
account-nopass()
{
case $OSTYPE in
linux*)
passwd_file="/etc/shadow"
;;
freebsd*)
passwd_file="/etc/master.passwd"
;;
esac

awk -F: '$2 == "" { print $1, "does not have password!" }'
$passwd_file
}
#-----------------------
account-root()
{
awk -F: '$3 == 0 { print $1, "has root privileges!" }' /etc/passwd
}
#################################################


################### HISTORY #####################
setopt append_history
setopt no_hist_beep
setopt hist_ignore_all_dups
setopt hist_ignore_space

HISTFILE=~/.zshhistory
HISTSIZE=1000
SAVEHIST=1000
#################################################


################### PROMPT ######################
setopt prompt_subst

if [[ $UID == 0 ]]; then
PS1="${red}[${blue}%T ${red}%n ${blue}%1~${red}]%#${nocolor} "
else
PS1="${red}[${blue}%T ${green}%n ${blue}%2~${red}]%#${nocolor} "
fi
#################################################


################### KEYBINDINGS #################
bindkey -e

case $TERM in
linux)
bindkey "^[[1~" beginning-of-line # Home
bindkey "^[[4~" end-of-line # End
bindkey "^[[3~" delete-char # Del
bindkey "^[[2~" overwrite-mode # Insert
bindkey "^[[5~" history-search-backward # PgUp
bindkey "^[[6~" history-search-forward # PgDn
;;

xterm)
bindkey "^[[H" beginning-of-line # Home
bindkey "^[[F" end-of-line # End
bindkey "^[[3~" delete-char # Del
bindkey "^[[2~" overwrite-mode # Insert
bindkey "^[[5~" history-search-backward # PgUp
bindkey "^[[6~" history-search-forward # PgDn
;;

cons25l2)
bindkey "^[[H" beginning-of-line # Home
bindkey "^[[F" end-of-line # End
bindkey "^?" delete-char # Del
bindkey "^[[L" overwrite-mode # Insert
bindkey "^[[I" history-search-backward # PgUp
bindkey "^[[G" history-search-forward # PgDn
;;
esac
#################################################


autoload -U compinit && compinit
if_not_loaded zsh/complist && zmodload zsh/complist

zstyle ':completion:*' completer \
_force_rehash _complete _list _oldlist _expand _ignored _match \
_correct _approximate _prefix

zstyle ':completion:*' auto-description 'specify: %d'
zstyle ':completion:*' list-colors
'no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;3
5:do=01;35:bd=40;33;01:cd=40;33;01r=40;31;01:ex= 01;32:*.tar=01;31:*.tgz=01;31:*.
arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z= 01;31:*.Z=01;31:*.gz=01;31:*.bz2
=01;31:*.deb=01;31:*.rpm=01;31:*.jpg=01;35:*.png=0 1;35:*.gif=01;35:*.bmp=01;35:*.p
pm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif =01;35:*.png=01;35:*.mpg=01;35:*
..avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:'
zstyle ':completion:*' list-prompt %SAt %p: Hit TAB for more, or the
character to
#insert%s
# Partly insensitive matcher:
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' ''
# Completely insensitive matcher:
#zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' ''
zstyle ':completion:*' menu select=1
zstyle ':completion:*' select-prompt %SScrolling active: current
selection at %p%s
zstyle ':completion:*' use-compctl false
zstyle ':completion:*' verbose true

  Réponse avec citation
Vieux 31/07/2007, 22h30   #5
Frank Terbeck
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Zsh completion always includes home directory

Trans <transfire@gmail.com>:
> On Jul 31, 1:34 am, Erik Max Francis <m...@alcyone.com> wrote:
> > Trans wrote:
> > > No matter what directory I'm in, when I use tab completion, Zsh will
> > > include my home directory in the list. It's driving me nuts. Why would
> > > it do that when I can just use ~ to get home? Anyway, can anyone tell
> > > me what to add to my .zshrc file to get it to stop.

> >
> > > (P.S. I'm running Arch Linux, but the completion code I'm currently
> > > using is almost a straight copy from GoboLinux).

> >
> > This certainly isn't the way it normally behaves. You've done something
> > (inadvertently, obviously) to cause this. You'll have to indicate what
> > you're doing in order to determine what.
> >
> > --
> > Erik Max Francis && m...@alcyone.com &&http://www.alcyone.com/max/
> > San Jose, CA, USA && 37 20 N 121 53 W && AIM, Y!M erikmaxfrancis
> > Fear is an emotion indispensible for survival.
> > -- Hannah Arendt

>
> Thanks. Okay, here's my .zshrc
>
> ################## ZSH OPTIONS ##################
> setopt auto_cd
> setopt cd_able_vars


cdablevars is the one you don't want (IIRC).

Regards, Frank

--
There are no threads in alt.binaries.pictures.erotica,
so there's no gain in using a threaded news reader.
-- unknown source
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 14h00.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,16228 seconds with 13 queries