Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Problem with zip completion



[back to zsh-users]

Thanks for the patch. But when I try to use patch, I get the following:

greux:~/software/zsh-4.0.2> patch < ../zsh-zip-patch                  <18:09:13
can't find file to patch at input line 8
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|Index: Completion/Unix/Command/_zip
|===================================================================
|RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_zip,v
|retrieving revision 1.2
|diff -u -r1.2 _zip
|--- Completion/Unix/Command/_zip       2001/08/14 16:23:42     1.2
|+++ Completion/Unix/Command/_zip       2001/10/17 15:12:15
--------------------------
File to patch:

and I have to give the filename. Why couldn't patch find it?
What option should I use (the -p<num> options don't do anything)?

Moreover, why did I need to delete the .zcompdump file? Otherwise,
I had the following errors when execing zsh:

/users/spaces/lefevre/.zcompdump:487: command not found: ^[]1
/users/spaces/lefevre/.zcompdump:487: command not found: greux:~^G^[]2
/users/spaces/lefevre/.zcompdump:487: bad pattern: [1

This may come from:

precmd()
{
  psvar[1]=$#jobstates;
  if [[ $psvar[1] -eq 0 ]] then
    psvar[1]=()
  elif [[ $psvar[1] -eq 1 ]] then
    psvar[1]="$psvar[1] job"
  else
    psvar[1]="$psvar[1] jobs"
  fi
  # Note: STY is set by screen
  if [[ $TERM == (xterm*|dtterm|rxvt) && -z $STY ]] then
    print -nP "\e]1;%m:%.\x07"
    print -nP "\e]2;%(1v. [%1v] .)${WINTITLE:+ [$WINTITLE]} %n@%m - %~ \x07"
  fi
}

In .zcompdump:

[...]
_compautos=(
_call_program +X
)

ESC]1;greux:~^GESC]2; [1 job]  lefevre@greux - ~ ^Gzle -C _bash_complete-word .complete-word _bash_completions
zle -C _bash_list-choices .list-choices _bash_completions
zle -C _complete_debug .complete-word _complete_debug
zle -C _complete_help .complete-word _complete_help
zle -C _complete_tag .complete-word _complete_tag
zle -C _correct_filename .complete-word _correct_filename
zle -C _correct_word .complete-word _correct_word
zle -C _expand_alias .complete-word _expand_alias
zle -C _expand_word .complete-word _expand_word
zle -C _history-complete-newer .complete-word _history_complete_word
zle -C _history-complete-older .complete-word _history_complete_word
zle -C _list_expansions .list-choices _expand_word
zle -C _most_recent_file .complete-word _most_recent_file
zle -C _next_tags .complete-word _next_tags
zle -C _read_comp .complete-word _read_comp
ESC]1;greux:~^GESC]2; [1 job]  lefevre@greux - ~ ^Gbindkey '^X^R' _read_comp
bindkey '^X?' _complete_debug
bindkey '^XC' _correct_filename
[...]

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/> - 100%
validated HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des
Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA



Messages sorted by: Reverse Date, Date, Thread, Author