bay icon indicating copy to clipboard operation
bay copied to clipboard

Add support for `--quiet` and `--mounted` options in `bay mounts`

Open bar opened this issue 7 years ago • 4 comments

(bay) ➜  bay git:(mounts) bay mounts --help
Usage: bay mounts [OPTIONS]

  List current dev mounts for all containers.

Options:
  -p, --profile-only           Filter by current profile.
  -m, --mounted                Filter by mounted dev mounts.
  -v, --verbose / -q, --quiet  Full output, or dev mounts names only.
  --help                       Show this message and exit.

bar avatar Feb 17 '18 03:02 bar

Can you please edit the description above to put sample output for each combination of arguments?

nickwilliams-eventbrite avatar Feb 20 '18 16:02 nickwilliams-eventbrite

I was thinking of making -m default to true, what do you think?

guillaume-eb avatar Apr 17 '18 00:04 guillaume-eb

I like the idea to filter output by

  • current profile containers only
  • mounted only

but the negative filters might end up being a little weird

Option A

(bay) ➜  bay git:(mounts) ✗ bay mounts --help
Usage: bay mounts [OPTIONS]

  List mounted dev mounts from current profile containers.

Options:
  +p, --profile-only / -p, --no-profile-only
                                  Filter by current profile.
  +m, --mounted-only / -m, --no-mounted-only
                                  Filter by mounted dev mounts.
  -v, --verbose / -q, --quiet     Full output, or dev mounts names only.
  --help                          Show this message and exit.

Makes sense but not strictly POSIX compat, do we care?

Option B

(bay) ➜  bay git:(mounts) ✗ bay mounts --help
Usage: bay mounts [OPTIONS]

  List mounted dev mounts from current profile containers.

Options:
  -a, --all-containers         Don't filter by current profile.
  -m, --all-devmounts          Don't filter by mounted dev mounts.
  -v, --verbose / -q, --quiet  Full output, or dev mounts names only.
  --help                       Show this message and exit.

POSIX compat, but might not feel right at first glance

what are your thoughts?

bar avatar May 01 '18 23:05 bar

I like option B better

so the defaults will be: only for the current profile, and only show mounted containers?

guillaume-eb avatar May 09 '18 22:05 guillaume-eb