backwards move
bmv
is used to quickly and painlessly reverse the effects of a mv
command.
Basic usage is simple:
$ mv source target
$ bmv target source
This allows you to simply prepend a previous command with the letter b
and reverse the effects.
history passing
Additionally there is the slightly advanced feature of history passing.
History passing allows you to pipe the output of history
into bmv
, parse it to discover the most recent usage of mv
, and automatically run bmv
with the appropriate arguments.
Currently the parsing of history
requires a HISTTIMEFORMAT
of %F %T
. Future version should allow for taking the current HISTTIMEFORMAT
into account.
For example
$ ls
source
$ mv source target
$ ls
target
$ history | bmv
$ ls
source
Contributing
- Fork it ( https://github.com/willamin/bmv/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- willamin Will Lewis - creator, maintainer