Skip to content

domk/mvx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MVX

Purpose

The mvx command aims at providing a mv/cp tool modifying only file extension while keeping the basename constant and preventing such kind of mistake:

$ ls -1
light.md
$ mv light.md ligt.md.bak
$ ls -1
ligt.md.bak

Examples

To perform the same kind of change, mvx can be invoked with:

$ mvx light.md -a .bak
$ ls -1
light.md.bak

mvx allows also to make a copy instead of a move using the --copy switch:

$ mvx -c light.md -a .bak
$ ls
light.md
light.md.bak

One can also remove an extension with the --remove argument:

$ ls
light.md.bak
$ mvx light.md.bak -r .bak
$ ls
light.md

Installation

Copy the repository locally, then:

$ cargo build --release
$ cargo install --path . --root /wherever/you/want --no-track --force

If cpx is a link to mvx name, the program will perform as if the --copy flag was provided:

$ ln -s /wherever/you/want/mvx /wherever/you/want/cpx
$ ls
light.md.bak
$ /wherever/you/want/cpx light.md.bak -r .bak
$ ls -1
light.md
light.md.bak

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages