Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -v flag support to main CLI command #5871

Closed
francislavoie opened this issue Oct 9, 2023 · 8 comments · Fixed by #5874
Closed

Add -v flag support to main CLI command #5871

francislavoie opened this issue Oct 9, 2023 · 8 comments · Fixed by #5874
Labels
feature ⚙️ New feature or request good first issue 🐤 Good for newcomers

Comments

@francislavoie
Copy link
Member

Most a note-to-self to implement this, but if someone wants to open a PR before I do, by all means.

In the past, we used Go's stdlib flags which meant it was not possible to support caddy -v. But we've since switched to Cobra, so it's now possible to do so.

For context, some users were complaining about this on social media:

@francislavoie francislavoie added feature ⚙️ New feature or request good first issue 🐤 Good for newcomers labels Oct 9, 2023
@mholt
Copy link
Member

mholt commented Oct 9, 2023

-v is verbose, yeah?

@francislavoie
Copy link
Member Author

No, caddy -v would be the same as caddy version.

It's conventional to have -v emit the version unless it means verbose, but for the main caddy command it does nothing other than output help regardless of flags right now so there's no conflict.

@francislavoie
Copy link
Member Author

francislavoie commented Oct 14, 2023

Yep! I only happened to see it because it was quoted by @MattWilcox where I could see it on Mastodon. Feel free to reach out to us directly, or on the forums, or open an issues if you have complaints next time!

Something worth mentioning, there seems to have been a misunderstanding about manpages. We definitely do ship manpages with our .deb and .rpm distributions. It depends how you actually installed Caddy though, if you didn't install it with one of those ways.

@girlbossceo
Copy link
Contributor

@francislavoie Arch Linux still does not appear to have Caddy manpages when installed from the official package.

[root@girlcock ~]# pacman -Qi | grep caddy
Name            : caddy
URL             : https://github.com/caddyserver/caddy
Required By     : alsa-lib  argon2  attr  audit  base  bash  bind  binutils  bison  brotli  btrfs-progs  bzip2  caddy  chrony  coreutils  dav1d  debugedit  device-mapper  diffutils  dnssec-tools  expat  fakeroot  file  findutils  flex  fribidi  gawk  gcc-libs  gdbm  geoipupdate  giflib  gnupg  gnutls  gperftools  grep  gsm  gzip  hiredis  icu  inetutils  iproute2  jack2  jansson  jbigkit  jemalloc  jq  json-c  kbd  keyutils  kmod  krb5  l-smash  less  libass  libassuan  libasyncns  libavc1394  libbpf  libcap  libcap-ng  libdatrie  libdeflate  libdrm  libedit  libelf  libffi  libgpg-error  libjpeg-turbo  libksba  libmaxminddb  libmnl  libnfnetlink  libnghttp2  libnl  libnsl  libogg  libomxil-bellagio  libopenmpt  libp11-kit  libpcap  libpciaccess  libpipeline  libraw1394  libsamplerate  libsasl  libseccomp  libsndfile  libsodium  libtasn1  libthai  libtheora  libtiff  libtirpc  libtool  libunistring  liburing  libusb  libutempter  libuv  libverto  libx11  libxau  libxcb  libxcrypt  libxdmcp  libxshmfence  lmdb  lz4  lzo  m4  make  man-db  mkinitcpio-busybox  mpfr  ncurses  nettle  npth  ocl-icd  opencore-amr  openexr  openssh  openssl  opus  pacman  pam  patch  pciutils  pcre  pdnsd  perl  pinentry  pixman  pkgconf  popt  portaudio  procps-ng  protobuf  python-pyrsistent  python-rapidfuzz  python-rpds-py  rav1e  readline  sdl2  sed  shadow  shared-mime-info  sqlite  sudo  svt-av1  systemd-libs  tar  util-linux-libs  vid.stab  vim  vulkan-icd-loader  wayland  which  xvidcore  xxhash  zimg  zlib  zstd
[root@girlcock ~]# man caddy
No manual entry for caddy

@francislavoie
Copy link
Member Author

Ah. We (the core Caddy maintainers) don't maintain the Arch repo.

FYI @anthraxx @shibumi FYI we have a caddy manpage command to generate them. Could you include that as part of the setup/build of the Arch package please? We also have a caddy completion command to generate shell completions.

@MattWilcox
Copy link

Glad to see this change incorporated by my post! Thank you so much! <3

For context, some users were complaining about this on social media:

* https://frfsh.plus.st/notes/9hxugdnvdqnjgnm7

Did try to CC you about this, but then couldn't work out how to do so via Mastodon, then decided firefish must not talk with Mastodon. Or I'm just missing something!

@girlbossceo
Copy link
Contributor

@MattWilcox Firefish should be able to communicate with Mastodon like normal! I haven't been aware of any federation issues with our Firefish instance. Glad you at least got it over, I initially made that post in like 2 seconds and didn't expect it to blow up or it actually change anything and didn't think much of it after c: Especially since it seems like every piece of Go software has this behaviour.

@shibumi
Copy link

shibumi commented Oct 14, 2023

@francislavoie thank you for the hint. I will take a look! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature ⚙️ New feature or request good first issue 🐤 Good for newcomers
Projects
None yet
5 participants