$ kaimei -t '{n}_{stem}.{ext}' -e 's/ /\//' 'a b?.txt' c.txt d.txt
  a b?.txt  →  100_a-b?.txt
  d.txt     →  101_d.txt
  c.txt     →  102_c.txt
3 to rename, 0 unchanged. Preview only: nothing was renamed; add -y to apply.

$ kaimei --safe portable --start 1 -t '{n}_{stem}.{ext}' 'a b?.txt'
  a b?.txt  →  1_a b-.txt
1 to rename, 0 unchanged. Preview only: nothing was renamed; add -y to apply.

$ kaimei --no-config -t '{n}_{stem}.{ext}' 'a b?.txt'
  a b?.txt  →  1_a b_.txt
1 to rename, 0 unchanged. Preview only: nothing was renamed; add -y to apply.

$ kaimei --match '^(c)' -t '{orig.1}2.{ext}' c.txt d.txt
  c.txt  →  c2.txt
  d.txt  skipped: no value for {orig.1}
1 to rename, 0 unchanged, 1 skipped (no value). Preview only: nothing was renamed; add -y to apply.

$ kaimei 'a b?.txt'
[exit 1]
[stderr]
kaimei: config: safe = "posixx" is not one of: posix, portable, windows

$ kaimei 'a b?.txt'
[exit 1]
[stderr]
kaimei: $TMP/config/kaimei/config.toml: TOML parse error at line 1, column 1
  |
1 | colour = "never"
  | ^^^^^^
unknown field `colour`, expected one of `safe`, `replace-char`, `fullwidth`, `sort`, `missing`, `color`, `ci`, `nfd`, `trim-dot`, `romaji-long`, `start`, `step`, `jobs`


$ kaimei -t '{stem}_x.{ext}' e d.txt
  d.txt  →  d_x.txt
  e      →  e_x
2 to rename, 0 unchanged. Preview only: nothing was renamed; add -y to apply.

$ kaimei --no-trim-dot -t '{stem}_x.{ext}' e
  e  →  e_x.
1 to rename, 0 unchanged. Preview only: nothing was renamed; add -y to apply.

$ kaimei --no-trim-dot --trim-dot -t '{stem}_x.{ext}' e
  e  →  e_x
1 to rename, 0 unchanged. Preview only: nothing was renamed; add -y to apply.

$ kaimei -e s/d/C/ d.txt
[exit 1]
  d.txt  →  C.txt
      error: c.txt already exists (same name ignoring case)
1 to rename, 0 unchanged.
1 error(s): nothing was renamed.

$ kaimei --no-ci -e s/d/C/ d.txt
  d.txt  →  C.txt
1 to rename, 0 unchanged. Preview only: nothing was renamed; add -y to apply.

$ kaimei --config $TMP/other.toml 'a b?.txt'
  a b?.txt  →  a b+.txt
1 to rename, 0 unchanged. Preview only: nothing was renamed; add -y to apply.

$ kaimei --config /nonexistent/kaimei.toml 'a b?.txt'
[exit 1]
[stderr]
kaimei: /nonexistent/kaimei.toml: No such file or directory (os error 2)

