feat: Add flag to ignore extension
This commit is contained in:
parent
d9d715986b
commit
c05005b334
2 changed files with 82 additions and 7 deletions
49
readme.md
49
readme.md
|
|
@ -2,12 +2,55 @@
|
|||
|
||||
Rename files with your favourite editor
|
||||
|
||||
## Installation
|
||||
|
||||
Build from source:
|
||||
|
||||
```bash
|
||||
git clone git@github.com:js0ny/renamedit.git
|
||||
git clone https://github.com/js0ny/renamedit.git
|
||||
cd renamedit
|
||||
go build
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
renamedit <dir>
|
||||
```
|
||||
renamedit [options] <directory>
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
- `-ignore-ext`: Ignore file extensions when renaming files. This will preserve the original extensions.
|
||||
|
||||
### Examples
|
||||
|
||||
Basic usage:
|
||||
```bash
|
||||
renamedit /path/to/directory
|
||||
```
|
||||
|
||||
Ignore file extensions (useful for batch renaming while preserving extensions):
|
||||
```bash
|
||||
renamedit -ignore-ext /path/to/directory
|
||||
```
|
||||
|
||||
## How It Works
|
||||
|
||||
1. The program opens a temporary file in your preferred text editor
|
||||
2. Edit the file names as needed
|
||||
3. Save and exit the editor
|
||||
4. The program will rename the files according to your edits
|
||||
|
||||
## Environment Variables
|
||||
|
||||
- `EDITOR`: Set this to your preferred text editor (defaults to vim)
|
||||
|
||||
## Supported Editors
|
||||
|
||||
The following editors are explicitly supported with wait flags:
|
||||
- Visual Studio Code (code)
|
||||
- Sublime Text (subl)
|
||||
- Zed Editor (zeditor)
|
||||
- Atom (atom)
|
||||
- Gedit (gedit)
|
||||
- And most terminal editors (vim, nano, etc.)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue