trzsz is a simple file transfer tools, similar to lrzsz ( rz / sz ) but compatible with tmux, which works with iTerm2 and has a nice progress bar.
Project description
trzsz
trzsz is a simple file transfer tools, similar to lrzsz ( rz / sz ) but compatible with tmux.
which works with iTerm2 and has a nice progress bar.
Website: https://trzsz.github.io
Why?
I love to use iTerm2 integrating with tmux to manage terminal sessions.
Sometimes, I need to transfer some files between my laptop and the remote server.
Considering laptop -> hostA -> hostB -> docker -> tmux
, using scp to transfer files is inconvenience.
Tmux is not going to support lrzsz ( rz / sz ) ( 906, 1439 ), and I found out that creating a new file transfer tools is much easier than patching tmux.
Additionally, iTerm2-zmodem is not supporting a progress bar. Is there something wrong happened or just need more time?
Requirements
- Python
- Python’s standard library is good enough.
- iTerm2
- Tmux Integration and Coprocesses are so cool.
btw
without tmux works too.
- zenity
- Optional for a nice progress bar.
Installation
Server side
Install trzsz-svr
sudo python3 -m pip install --upgrade trzsz-libs trzsz-svr
- Also supports Python2:
sudo pip install --upgrade trzsz-libs trzsz-svr
Client side
Install trzsz-iterm2
sudo python3 -m pip install --upgrade trzsz-libs trzsz-iterm2
- Also supports Python2:
sudo pip install --upgrade trzsz-libs trzsz-iterm2
- After installation,
which trzsz-iterm2
should output/usr/local/bin/trzsz-iterm2
, if not:which trzsz-iterm2
shows nothing, check the output of the previous installation.which trzsz-iterm2
shows another path, create a soft link:
sudo ln -sv $(which trzsz-iterm2) /usr/local/bin/trzsz-iterm2
Install iTerm2 and create a Trigger as follows.
Name | Value |
---|---|
Regular Expression | :(:TRZSZ:TRANSFER:[SR]:\d+\.\d+\.\d+) |
Action | Run Silent Coprocess |
Parameters | /usr/local/bin/trzsz-iterm2 \1 |
Enabled | ✅ Checked |
Use interpolated strings for parameters | ❎ Unchecked |
Optional
install zenity for a nice progress bar.
brew install ncruces/tap/zenity
- After installation,
which zenity
should output/usr/local/bin/zenity
, if not:which zenity
shows nothing, check the output of the previous installation.which zenity
shows another path, create a soft link:
sudo ln -sv $(which zenity) /usr/local/bin/zenity
Manual
trz
upload files to remote server
usage: trz [-h] [-v] [-q] [path]
Receive file(s), similar to rz but compatible with tmux.
positional arguments:
path path to save file(s). (default: current directory)
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-q, --quiet quiet (hide progress bar)
tsz
download files from remote server
usage: tsz [-h] [-v] [-q] file [file ...]
Send file(s), similar to sz but compatible with tmux.
positional arguments:
file file(s) to be sent
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-q, --quiet quiet (hide progress bar)
Screenshot
Upload files to remote server
Download files from remote server
Contact
Feel free to email me lonnywong@qq.com (same as my PayPal account, just in case you want to deduct🤑).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for trzsz_iterm2-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ede651c330403cdb135f5521d569b115af0f3a9e835499f3fa54f55d47e5fb4 |
|
MD5 | 31c72d5f592a5a1d40b125e1863eadac |
|
BLAKE2b-256 | 225e74bb8d91dfcd41fe6c18e6c283b4f37884533b8642fe633f984ee3c3f951 |