-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add new option -a to list absolute path
- Loading branch information
1 parent
476e19d
commit 46f669e
Showing
2 changed files
with
45 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,19 +48,19 @@ | |
|
||
#### Method 1: Download binaries | ||
|
||
[brename v2.4.0](https://github.com/shenwei356/brename/releases/tag/v2.4.0) | ||
[![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/brename/v2.4.0/total.svg)](https://github.com/shenwei356/brename/releases/tag/v2.4.0) | ||
[brename v2.5.1](https://github.com/shenwei356/brename/releases/tag/v2.5.1) | ||
[![Github Releases (by Release)](https://img.shields.io/github/downloads/shenwei356/brename/v2.5.1/total.svg)](https://github.com/shenwei356/brename/releases/tag/v2.5.1) | ||
|
||
***Tip: run `brename -V` to check update !!!*** | ||
|
||
OS |Arch |File, 中国镜像 |Download Count | ||
:------|:---------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ||
Linux |32-bit |[brename_linux_386.tar.gz](https://github.com/shenwei356/brename/releases/download/v2.5.0/brename_linux_386.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_linux_386.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_linux_386.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.5.0/brename_linux_386.tar.gz) | ||
Linux |**64-bit**|[**brename_linux_amd64.tar.gz**](https://github.com/shenwei356/brename/releases/download/v2.5.0/brename_linux_amd64.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_linux_amd64.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_linux_amd64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.5.0/brename_linux_amd64.tar.gz) | ||
OS X |32-bit |[brename_darwin_386.tar.gz](https://github.com/shenwei356/brename/releases/download/v2.5.0/brename_darwin_386.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_darwin_386.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_darwin_386.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.5.0/brename_darwin_386.tar.gz) | ||
OS X |**64-bit**|[**brename_darwin_amd64.tar.gz**](https://github.com/shenwei356/brename/releases/download/v2.5.0/brename_darwin_amd64.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_darwin_amd64.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_darwin_amd64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.5.0/brename_darwin_amd64.tar.gz) | ||
Windows|32-bit |[brename_windows_386.exe.tar.gz](https://github.com/shenwei356/brename/releases/download/v2.5.0/brename_windows_386.exe.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_windows_386.exe.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_windows_386.exe.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.5.0/brename_windows_386.exe.tar.gz) | ||
Windows|**64-bit**|[**brename_windows_amd64.exe.tar.gz**](https://github.com/shenwei356/brename/releases/download/v2.5.0/brename_windows_amd64.exe.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_windows_amd64.exe.tar.gz)|[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_windows_amd64.exe.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.5.0/brename_windows_amd64.exe.tar.gz) | ||
Linux |32-bit |[brename_linux_386.tar.gz](https://github.com/shenwei356/brename/releases/download/v2.5.1/brename_linux_386.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_linux_386.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_linux_386.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.5.1/brename_linux_386.tar.gz) | ||
Linux |**64-bit**|[**brename_linux_amd64.tar.gz**](https://github.com/shenwei356/brename/releases/download/v2.5.1/brename_linux_amd64.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_linux_amd64.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_linux_amd64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.5.1/brename_linux_amd64.tar.gz) | ||
OS X |32-bit |[brename_darwin_386.tar.gz](https://github.com/shenwei356/brename/releases/download/v2.5.1/brename_darwin_386.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_darwin_386.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_darwin_386.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.5.1/brename_darwin_386.tar.gz) | ||
OS X |**64-bit**|[**brename_darwin_amd64.tar.gz**](https://github.com/shenwei356/brename/releases/download/v2.5.1/brename_darwin_amd64.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_darwin_amd64.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_darwin_amd64.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.5.1/brename_darwin_amd64.tar.gz) | ||
Windows|32-bit |[brename_windows_386.exe.tar.gz](https://github.com/shenwei356/brename/releases/download/v2.5.1/brename_windows_386.exe.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_windows_386.exe.tar.gz) |[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_windows_386.exe.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.5.1/brename_windows_386.exe.tar.gz) | ||
Windows|**64-bit**|[**brename_windows_amd64.exe.tar.gz**](https://github.com/shenwei356/brename/releases/download/v2.5.1/brename_windows_amd64.exe.tar.gz),<br/> [中国镜像](http://app.shenwei.me/data/brename/brename_windows_amd64.exe.tar.gz)|[![Github Releases (by Asset)](https://img.shields.io/github/downloads/shenwei356/brename/latest/brename_windows_amd64.exe.tar.gz.svg?maxAge=3600)](https://github.com/shenwei356/brename/releases/download/v2.5.1/brename_windows_amd64.exe.tar.gz) | ||
|
||
|
||
Just [download](https://github.com/shenwei356/brename/releases) compressed | ||
|
@@ -95,7 +95,7 @@ And then: | |
``` | ||
brename -- a practical cross-platform command-line tool for safely batch renaming files/directories via regular expression | ||
Version: 2.5.0 | ||
Version: 2.5.1 | ||
Author: Wei Shen <[email protected]> | ||
|
@@ -115,7 +115,7 @@ Special replacement symbols: | |
n can be specified by flag -I/--key-capt-idx (default: 1) | ||
Usage: | ||
brename [flags] | ||
brename [flags] | ||
Examples: | ||
1. dry run and showing potential dangerous operations | ||
|
@@ -153,6 +153,7 @@ Flags: | |
-m, --key-miss-repl string replacement for key with no corresponding value | ||
-k, --kv-file string tab-delimited key-value file for replacing key with value when using "{kv}" in -r (--replacement) | ||
-l, --list only list paths that match pattern | ||
-a, --list-abs list absolute path, using along with -l/--list | ||
-p, --pattern string search pattern (regular expression) | ||
-R, --recursive rename recursively | ||
-r, --replacement string replacement. capture variables supported. e.g. $1 represents the first submatch. ATTENTION: for *nix OS, use SINGLE quote NOT double quotes or use the \ escape character. Ascending integer is also supported by "{nr}" | ||
|
@@ -350,9 +351,23 @@ Take a directory for example: | |
└── b | ||
└── c.txt | ||
|
||
1. only list paths that match pattern (`-l`) | ||
|
||
brename -i -f '.docx?$' -p . -R -l | ||
1. only list paths that match pattern (`-l` and `-a`) | ||
|
||
$ brename -p '.gz$' -R -l | ||
binaries/brename_darwin_386.tar.gz | ||
binaries/brename_darwin_amd64.tar.gz | ||
binaries/brename_linux_386.tar.gz | ||
binaries/brename_linux_amd64.tar.gz | ||
binaries/brename_windows_386.exe.tar.gz | ||
binaries/brename_windows_amd64.exe.tar.gz | ||
$ brename -p '.gz$' -R -l | ||
/home/shenwei/project/src/github.com/shenwei356/brename/binaries/brename_darwin_386.tar.gz | ||
/home/shenwei/project/src/github.com/shenwei356/brename/binaries/brename_darwin_amd64.tar.gz | ||
/home/shenwei/project/src/github.com/shenwei356/brename/binaries/brename_linux_386.tar.gz | ||
/home/shenwei/project/src/github.com/shenwei356/brename/binaries/brename_linux_amd64.tar.gz | ||
/home/shenwei/project/src/github.com/shenwei356/brename/binaries/brename_windows_386.exe.tar.gz | ||
/home/shenwei/project/src/github.com/shenwei356/brename/binaries/brename_windows_amd64.exe.tar.gz | ||
|
||
|
||
## Real-world examples | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters