bmv

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

  1. Fork it ( https://github.com/willamin/bmv/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • willamin Will Lewis - creator, maintainer
Repository

bmv

Owner
Statistic
  • 0
  • 0
  • 0
  • 0
  • 2
  • about 2 years ago
  • October 23, 2018
License

MIT License

Links
Synced at

Sat, 27 Apr 2024 22:29:00 GMT

Languages