Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
358ac6a1
Unverified
Commit
358ac6a1
authored
Sep 09, 2021
by
Xuehai Pan
Committed by
GitHub
Sep 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(cp): add unique suffix to rsync backup directory for each user (#10170)
* fix(cp): add unique suffix to rsync backup directory for each user * fix(cp): use `USERNAME` rather than `USER`
parent
aa6e932b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
README.md
plugins/cp/README.md
+1
-1
cp.plugin.zsh
plugins/cp/cp.plugin.zsh
+1
-1
No files found.
plugins/cp/README.md
View file @
358ac6a1
...
...
@@ -25,7 +25,7 @@ The enabled options for rsync are:
*
`-hhh`
: outputs numbers in human-readable format, in units of 1024 (K, M, G, T).
*
`--backup-dir=
/tmp/rsync`
: move backup copies to "/tmp/rsync
".
*
`--backup-dir=
"/tmp/rsync-$USERNAME"`
: move backup copies to "/tmp/rsync-$USERNAME
".
*
`-e /dev/null`
: only work on local files (disable remote shells).
...
...
plugins/cp/cp.plugin.zsh
View file @
358ac6a1
cpv
()
{
rsync
-pogbr
-hhh
--backup-dir
=
/tmp/rsync
-e
/dev/null
--progress
"
$@
"
rsync
-pogbr
-hhh
--backup-dir
=
"/tmp/rsync-
${
USERNAME
}
"
-e
/dev/null
--progress
"
$@
"
}
compdef _files cpv
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment