sgryjp / pmv Goto Github PK
View Code? Open in Web Editor NEWPattern based mv(1)
License: Apache License 2.0
Pattern based mv(1)
License: Apache License 2.0
If there were two files and pmv swapped name of them, one of the files will be lost. A concrete example follows:
$ echo "AB" > AB
$ echo "BA" > BA
$ pmv -v '??' '#2#1'
./AB --> BA
./BA --> AB
$ cat AB && cat BA
AB
cat: BA: No such file or directory
Introduce a new option -i
/ --interactive
which forces pmv for each file to ask user to actually move the file or not.
Path string should be matched case-insensitively on Windows.
If there was a file named foo
, and a pattern "f*/*.txt" was specified, pmv tries to list children of foo
hence the operation ends up with an error.
If any of directory parts of a pattern matched a file(s), they are simply ignored.
pmv
panicks when the source was the root directory.
pmv
try to move the root directory, instead of panicking.
0.4.1
pmv / .
$ pmv -n / .
thread 'main' panicked at 'assertion failed: !patterns.is_empty()', /Users/sgryjp/.cargo/.../pmv-0.4.1/src/walk.rs:44:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Change the software license to the dual license of MIT & Apache 2.0.
Add logging feature so that users can save what happened or will happen.
Support wildcard pattern of character classes, with range and complementation notation.
Expected behavior of pmv SRC DEST
:
SRC
is a file or a symlink, and:
DEST
is a file: SRC
replaces DEST
DEST
is a directory: SRC
moves into DEST
DEST
is a symlink to a file: SRC
replaces DEST
(symlink itself)DEST
is a symlink to a directory: SRC
moves into DEST
SRC
is a directory, and:
DEST
is a file: ErrorDEST
is a directory: SRC
moves into DEST
DEST
is a symlink to a file: ErrorDEST
is a symlink to a directory: SRC
moves into DEST
fnmatch("I ? NY", "I ♡ NY")
The code above should return a Some(vec![String::from("♡")])
but actually None
is returned.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.