~mango/mmv

Add some tests

Co-authored-by: Luca Matei Pintilie <luca@lucamatei.com>
Add the ‘-b’ flag to only alter path basenames
Document the fallback backup directory
Support empty XDG_CACHE_HOME environmental variable

Follow-up from e5b6e24a621, fixes a scenario in which XDG_CACHE_HOME is
set, but it's set to an empty string instead of a path.

From the documentation
>If $XDG_CACHE_HOME is [...] empty, a default equal to $HOME/.cache should be used.
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

Signed-off-by: Luca Matei Pintilie <luca@lucamatei.com>
Run ‘cargo fmt’
Reword error message
Add default cache path if XDG_CACHE_HOME does not exist

If the XDG_CACHE_HOME environmental variable does not exist then mmv
will default to "$HOME/.cache"[1]

If HOME does not exist then it will panic like before

[1]: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

Signed-off-by: Luca Matei Pintilie <luca@lucamatei.com>
Properly escape single quotes

On some systems, single quotes that aren’t entered as ‘\(aq’ will always
be turned into smart-quotes which is terrible for code examples.
Put sentences on their own lines
Remove useless escape characters
Add MMV_NAME and MCP_NAME compile-time variables

Due to the sheer popularity of the "mmv" name it might conflict with
other programs installed on the user's computer.

As such the MMV_NAME and MCP_NAME environmental variables can control
the program's name at compile time, allowing the user to avoid name
conflicts with other programs.

If the variables are not set then they will silently default back to
"mmv" and "mcp" respectively.

Signed-off-by: Luca Matei Pintilie <luca@lucamatei.com>
Co-authored-by: Thomas Voss <mail@thomasvoss.com>
Use -f with ln in the Makefile
Update the README
Install ‘mmv’ as ‘mcp’
Update manual to document ‘mcp’
Add support for copying files
Document timestamps for backup dirname
Use nanosecs for backup dirname

The user doesn’t need this level of precision, but using seconds might cause
problems if two processes are spawned in quick succession to each other.  Since
we have the options, why not use the most precise one?
Name backup directories after current epoch
Next
Do not follow this link