New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

imv

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

imv

Interactive file mover inspired by git

latest
Source
npmnpm
Version
1.4.0
Version published
Maintainers
1
Created
Source

imv (Interactive Move)

Actions Status

An interactive file renamer/mover inspired by git

Install

npm install -g imv

Usage

  • You give imv a glob pattern of files you want to move or rename.
imv './home/*.png'
  • It opens the list in your favorite code editor (either by the --editor param or automatically via your git config).
./home/customer.png
./home/puppy.png
./home/cat.png
  • You make the edits you want, with the tools you already use like multiple cursors and regex.
./home-page/user.png
./home-page/puppy.png
./home-page/cat.png
  • Save the file and close it …sounds familiar to git commit/rebase?
  • imv will make the changes, the file on each line becomes the new file location.
  • imv deletes the old /home directory because the directory is now empty.
  • You're done!
Usage: imv [options] <glob>

imv -- interactive move files

Options:
  -v, --version          output the version number
  -e, --editor <editor>  use this editor to modify your file paths
  -i, --ignore <glob>    ignore files that match this glob pattern
  -g, --gitignore        ignore files that match patterns in .gitignore
  -o, --overwrite        overwrite existing files
  -t, --trash            send existing files to the trash bin
  -k, --keep-empty       keep empty affected folders after moving files
  -h, --help             output usage information

Limitations

To keep things simple, there are a few limitations:

  • It only moves files from the directory and any subdirectories where the imv command was made.
  • It cannot overwrite files that are also matched by the input glob pattern.
  • It cannot swap two file paths.

Development

You can install imv locally to develop on:

npm install
npm run dist
npm link

You can now use the imv command from your terminal. npm start will build in watch mode so you can make edits as you use the tool.

imv uses TypeScript for type safety, ESLint for linting, and Jest for testing.

Keywords

directory

FAQs

Package last updated on 05 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts