$ kaimei -t '{stem} [{crc32|upper}].{ext}' a.txt b.txt empty.txt
  a.txt      →  a [1C9BEA0A].txt
  b.txt      →  b [6C156477].txt
  empty.txt  →  empty [00000000].txt
3 to rename, 0 unchanged. Preview only: nothing was renamed; add -y to apply.

$ kaimei -t '{sha256:12}.{ext}' a.txt b.txt
  a.txt  →  cd2eb0837c9b.txt
  b.txt  →  2481a63c85a6.txt
2 to rename, 0 unchanged. Preview only: nothing was renamed; add -y to apply.

$ kaimei -t '{md5:8}-{sha1:8}.{ext}' a.txt
  a.txt  →  f561aaf6-b60d121b.txt
1 to rename, 0 unchanged. Preview only: nothing was renamed; add -y to apply.

$ kaimei -t '{sha256:12}.{ext}' a.txt copy.txt b.txt
[exit 1]
  a.txt     →  cd2eb0837c9b.txt
  b.txt     →  2481a63c85a6.txt
  copy.txt  →  cd2eb0837c9b.txt
      error: same new name as a.txt
3 to rename, 0 unchanged.
1 error(s): nothing was renamed.

$ kaimei --dirs -t '{name}-{crc32}' folder
[exit 1]
  folder  error: no value for {crc32}
0 to rename, 0 unchanged.
Give the field a fallback ({crc32?"none"}) or use --missing=skip or --missing=empty.
1 error(s): nothing was renamed.

$ kaimei --dirs -t '{name}-{crc32?"dir"}' folder
  folder  →  folder-dir
1 to rename, 0 unchanged. Preview only: nothing was renamed; add -y to apply.

$ kaimei -t '{sha256:0}' a.txt
[exit 1]
[stderr]
kaimei: bad template: {sha256}: '0' is not a length (like 8, for the first 8 hex digits)
  {sha256:0}
          ^

$ kaimei -t '{sha256:%Y}' a.txt
[exit 1]
[stderr]
kaimei: bad template: {sha256}: '%Y' is not a length (like 8, for the first 8 hex digits)
  {sha256:%Y}
          ^

$ kaimei vars --hash b.txt
b.txt
  name    b.txt
  stem    b
  ext     txt
  parent  files
  path    b.txt
  n       1
  size    4
  size.h  4B
  crc32   6c156477
  md5     ea416ed0759d46a8de58f63a59077499
  sha1    4ad583af22c2e7d40c1c916b2920299155a46464
  sha256  2481a63c85a62cf889d2b149f1a52e985a9341750173fe01eff50cc27b5941b5

