Asynchronous copy-paste can be helpful in a handful of situations:
- You can save the path in the clipboard and paste it later.
- You don’t have to work with super-long copy/move commands.
- Etc. (use your imagination)
Source Code
You can add the following code snippet to your zshrc to add the three commands into your shell. Note that some of the syntaxes in this snippet are zsh-only. You might need to modify it a bit if you want to use it in bash or other shells.
|
|
Copying Files and Directories
You can use the ac
(stands for async-copy) command to copy one or more files/directories, and use the ap
(stands for async-paste) command to paste it when you’re under another directory. Directories will be copied recursively automatically.
Asynchronously copying files and directories to a new location
Moving Files and Directories
You can use the am
(stands for async-move) command to move one or more files/directories, and use the ap
command to paste it elsewhere.
Asynchronously moving files and directories to a new location
最后修改于 2021-06-15