Function uucore::backup_control::determine_backup_suffix
source · pub fn determine_backup_suffix(matches: &ArgMatches) -> StringExpand description
Obtain the suffix to use for a backup.
In order of precedence, this function obtains the backup suffix
- From the ‘-S’ or ‘–suffix’ CLI argument, if present
- From the “SIMPLE_BACKUP_SUFFIX” environment variable, if present
- By using the default ‘~’ if none of the others apply
This function directly takes [clap::ArgMatches] as argument and looks for
the ‘-S’ and ‘–suffix’ arguments itself.