-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path_marine
30 lines (24 loc) · 866 Bytes
/
_marine
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#compdef marine
_marine() {
local curcontext="$curcontext" state line ret=1
typeset -A opt_args
#'(-p --path -d --date -l --locate)'{-p,--path}'[Specify full path of log file''s directory]: :_files -/' \
_arguments -C \
'(- :)'{-h,--help}'[Show this help and exit]' \
'(-a --all)'{-a,--all}'[Listup all files in the path]' \
'(-)'{-p,--path}'[Specify full path of log file''s directory]: :_files -/' \
'(-d --date -h --help -p --path)'{-d,--date}'[Specify date]: :->date' \
'(-l --locate -h --help -p --path)'{-l,--locate}'[Select locations]: :(ika fukushima kamiiso)' \
&& ret=0
#'(- :)*: :->_files' && ret=0
case $state in
date)
local _date
_date=(2015/{07..12}/{01..31})
_multi_parts ${words[(r)-w]:+-S/} -i / _date && ret=0
;;
esac
return $ret
}
_marine "$@"
# vim: ft=zsh sw=2 ts=2 et