Skip to content

Commit

Permalink
updated zsh completion file, needs more work
Browse files Browse the repository at this point in the history
  • Loading branch information
geier committed Jan 30, 2017
1 parent 50a76a6 commit c5754e4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions misc/__khal
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,17 @@ case $state in
subcommand)
local -a subcommands
subcommands=(
"agenda:show agenda"
'at:show all events for given time'
"calendar:show calendar"
"interactive:open the interactive calendar"
"configure: intitial configuration"
"edit:edit (or delete) an event"
"import:import an ics file into a calendar"
"interactive:open the interactive calendar"
"list:show list of events"
"new:add a new event"
"printcalendars:print all configured calendars"
"printformats:print a date in all formats"
"printics:print ics file without importing"
"search:search for events"
)

Expand All @@ -43,19 +46,19 @@ case $state in
curcontext="${curcontext%:*}-${words[1]}:"

case $words[1] in
at | calendar | agenda | interactive | search | printcalendars )
at | calendar | list | interactive | search | printcalendars | edit)
args+=(
"(-d --exclude-calendar $hlp)*"{-a+,--include-calendar=}'[specify calendar to use]:calendar:_calendars'
"(-a --include-calendar $hlp)*"{-d+,--exclude-calendar=}"[don't use this calendar]:calendar:_calendars"
)
;|
agenda | calendar)
list | calendar)
args+=(
"($hlp)--days=[specify how many days to include]:days:_dates -f d -F"
"($hlp)--events=[specify how many events to include]:events"
)
;|
at | agenda) args+=( '*:date/time' ) ;;
at | list) args+=( '*:date/time' ) ;;
new | import)
args+=(
"($hlp)-a+[specify calendar]:calendar:_calendars"
Expand All @@ -73,6 +76,7 @@ case $state in
"(-l --location $hlp)"{-l,--location=}'[specify location of event]:location'
"(-r --repeat $hlp)"{-r,--repeat=}'[repeat an event]:frequency:compadd -E0 - daily weekly monthly yearly'
"(-u --until $hlp)"{-u,--until=}'[specify date to stop an event repeating]:date'
"(-i --interactive $hlp)"{-i,--interactive=}'[interactively create a new event]'
':start date/time' '::end date/time' '::timezone' ':summary' ':description'
)
;;
Expand Down

0 comments on commit c5754e4

Please sign in to comment.