Add relative paths support for cp/mv as (#668)

This commit is contained in:
KlzXS 2020-06-27 17:46:17 +00:00 committed by GitHub
parent cb9e785145
commit 45d96ee60d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -660,7 +660,7 @@ static const char * const toks[] = {
static const char * const patterns[] = {
"sed -i 's|^\\(\\(.*/\\)\\(.*\\)$\\)|#\\1\\n\\3|' %s",
"sed 's|^\\([^#][^/]\\?.*\\)$|%s/\\1|;s|^#\\(/.*\\)$|\\1|' "
"sed 's|^\\([^#/][^/]\\?.*\\)$|%s/\\1|;s|^#\\(/.*\\)$|\\1|' "
"%s | tr '\\n' '\\0' | xargs -0 -n2 sh -c '%s \"$0\" \"$@\" < /dev/tty'",
"\\.(bz|bz2|gz|tar|taz|tbz|tbz2|tgz|z|zip)$",
"sed -i 's|^%s\\(.*\\)$|%s\\1|' %s",