bmv

command module
v0.0.14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 11, 2024 License: MIT Imports: 1 Imported by: 0

README

BMV - Bulkmove

Wrapper around mv which allows bulk operations via stdin.

bmv will also create missing directories and cleanup directories that became empty in the process. Both are configurable via flags.

Features

  • bulk renaming via stdin
  • rename file(s) in editor ($EDITOR)
  • define processor for renaming, f.e. sed
  • create missing directories on the fly
  • delete directories that became empty after moving
  • drop-in replacement for mv: args/flags will be passed to mv
  • handles circular renaming

Installation

# Arch
yay -S bmv
yay -S bmv-bin

# via Go
go install github.com/abenz126/bmv@latest

mv instance being used is /usr/bin/mv, unless $BMV_MV is specified.

Usage

# normal 'mv' actions, simply passed to 'mv':
bmv oldfile newfile

# bmv specific:
<2 column output from external [src dest\n]> | bmv
fzf -m | bmv -e # defaults to $EDITOR
fzf -m | bmv -e=vim
ls | bmv -p sed 's/old/new/'
bmv -p sed 's/old/new/' # implicit call to 'ls'
bmv # same as 'ls | bmv -e'

Documentation

Overview

Copyright © 2024 Andrej Benz <hello@benz.dev>

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL