mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-12-17 21:31:35 +01:00
users/9059: Nikolai Weibull: improved _vim_files
This commit is contained in:
parent
d4f81ce410
commit
b334c31e18
2 changed files with 11 additions and 7 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2005-07-08 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* users/9059: Nikolai Weibull: Completion/Unix/Command/_vim:
|
||||
improved _vim_files.
|
||||
|
||||
2005-07-07 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* users/9049: Completion/Unix/Command/_vim: add variant names
|
||||
|
|
|
|||
|
|
@ -1,16 +1,15 @@
|
|||
#compdef vim exim gvim gex gview rvim rview rgvim rgview evim eview vimdiff gvimdiff
|
||||
|
||||
(( $+functions[_vim_files] )) ||
|
||||
_vim_files () {
|
||||
if [[ $(echo $PREFIX*(N)) == '' ]]; then
|
||||
case $PREFIX in
|
||||
(+) _message -e 'start at a given line (default: end of file)' ;;
|
||||
(+<1->) _message -e 'line number' ;;
|
||||
esac
|
||||
fi
|
||||
case $PREFIX in
|
||||
(+*) _files -P './' $* ;;
|
||||
(+*) _files -P './' $* && return 0 ;;
|
||||
(*) _files $* ;;
|
||||
esac
|
||||
case $PREFIX in
|
||||
(+) _message -e 'start at a given line (default: end of file)' ;;
|
||||
(+<1->) _message -e 'line number' ;;
|
||||
esac
|
||||
}
|
||||
|
||||
local arguments
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue