Summary
The CLI flag --credential-command uses a hyphen, but the corresponding config file key only works as credential_command (underscore). The hyphenated form credential-command in ~/.config/fm/config.yaml is silently ignored.
Steps to reproduce
# ~/.config/fm/config.yaml
# This does NOT work:
credential-command: "security find-generic-password -s fm -a fm -w"
# This works:
credential_command: "security find-generic-password -s fm -a fm -w"
# With hyphen form in config:
fm session
# Error: no token configured
# With underscore form in config:
fm session
# Success: Username: cboone@fea.st
Expected behavior
The config file should accept the same key name as the CLI flag (credential-command with a hyphen), or both forms should be accepted.
This is likely a Viper/Cobra configuration binding issue where SetConfigName doesn't normalize hyphens to underscores (or vice versa) when reading the YAML file.
Summary
The CLI flag
--credential-commanduses a hyphen, but the corresponding config file key only works ascredential_command(underscore). The hyphenated formcredential-commandin~/.config/fm/config.yamlis silently ignored.Steps to reproduce
Expected behavior
The config file should accept the same key name as the CLI flag (
credential-commandwith a hyphen), or both forms should be accepted.This is likely a Viper/Cobra configuration binding issue where
SetConfigNamedoesn't normalize hyphens to underscores (or vice versa) when reading the YAML file.