insanum / gcalcli

Google Calendar Command Line Interface
MIT License
3.32k stars 314 forks source link

Options not valid anymore in ~/.gcalclirc ? #322

Open h3n3b0sch opened 7 years ago

h3n3b0sch commented 7 years ago

Hello,

I installed gcalcli version 4.0.0a3 in Debian buster with Synaptic. Everything installed without problems.

I made a file ~/.gcalclirc (as it states in the README.md) with the following:

  --military
  --duration=55
  --details=calendar
  --details=length
  --details=description
  --details=location
  --monday

It gives the following message before it shows a standard 5 day calendar:

The following options are either no longer valid globally or just plain invalid:
  --military
  --duration=55
  --details=calendar
  --details=length
  --details=description
  --details=location
  --monday

Are the options changed in v4.0.0a3 or maybe the way it should be written in the config file?

How and / or what should be put in ~/.gcalclirc to make the options work?

Hendrie

fullstopslash commented 6 years ago

I'm getting a similar error in a script that calls --calendar=Default#red --calendar=Work#blue --conky

These are all listed as no longer valid globally or just plain invalid.

grokkingit commented 6 years ago

I played a bit and options seem to be positional at the moment. So only options that occur before the command can be entered in the rc file.

So with the command below, only the --calendar option can be used in the rc file. gcalcli --calendar=mycalendar calw 1 --width=20

jcrowgey commented 6 years ago

We should improve this. Possibly we can create a way to specify subcommand configurations. I need to revew the config formats we're supporting. Personally, I think the ---option syntax in a config file is a little weird, but I haven't looked closely at config file stuff yet.

ReneFroger commented 5 years ago

This bug is still existing in the latest release version: gcalcli v4.0.0a3 (Eric Davis, Brian Hartvigsen) `

The output when I call gcalcli with my custom .gcalclirc is the following:

The following options are either no longer valid globally or just plain invalid:
  --color_date=white
  --color_owner=white
  --color_now_marker=yellow
  --monday=true
  --military
yermulnik commented 5 years ago

How do I force gcalcli to honor --monday and --military options?

mschaaf commented 5 years ago

@yermulnik I had to use them on the command line and then as the last argument, e.g. gcalcli agenda --military and not gcalcli --military agenda

yermulnik commented 5 years ago

Oh, I missed to specify that I need this for remind

jcrowgey commented 5 years ago

I'd love to see some work adding hints for people when they trip on these things. Lots of cli utilities with complex invocation options provide better feedback than we do. It would be nice to improve our handling of these cases.