Command mdrename renames/moves single markdown (.md) file, while scanning
for all .md files under current working directory, looking for links
referencing moved file. If it finds such files, it then updates links so
they point to new location.
Usage:
mdrename file.md new-name.md
Note that since it may potentially update multiple files, the whole
operation is not atomic, it is advisable to only run it over files versioned
by VCS which can be restored in case of any errors.
Currently only inline links like [link](dst.md) are supported; links like
[link][id] are NOT supported. The reason for this is that links are updated
by substring replacements inside text, this may lead to some invalid
replacements, and handling only inline links somewhat reduces risk of
invalid replacements. Please check results before committing them.
If program succeeds in renaming file and updating all found references, and
"mdurlcheck" tool exists in PATH, then "mdurlcheck ." is called as a final
step, this way you can see whether any links (especially non-inline ones)
were missed.
Command mdrename renames/moves single markdown (.md) file, while scanning for
all .md files under current working directory, looking for links referencing
moved file. If it finds such files, it then updates links so they point to new
location.
Usage:
mdrename file.md new-name.md
Note that since it may potentially update multiple files, the whole operation is
not atomic, it is advisable to only run it over files versioned by VCS which can
be restored in case of any errors.
Currently only inline links like [link](dst.md) are supported; links like
[link][id] are NOT supported. The reason for this is that links are updated by
substring replacements inside text, this may lead to some invalid replacements,
and handling only inline links somewhat reduces risk of invalid replacements.
Please check results before committing them.
If program succeeds in renaming file and updating all found references, and
"mdurlcheck" tool exists in PATH, then "mdurlcheck ." is called as a final step,
this way you can see whether any links (especially non-inline ones) were missed.