Skip to main content

trzsz-iterm2

trzsz ( trz / tsz ) is a simple file transfer tools, similar to lrzsz ( rz / sz ), and compatible with tmux.

trzsz-iterm2 is a client tool for trzsz used with iTerm2.

MIT License PyPI trzsz-iterm2 中文网站

Installation

  • With Python3

    sudo python3 -m pip install --upgrade trzsz-iterm2
    
  • With Homebrew

    brew update
    brew install trzsz
    

Configuration

  • Find out the absolute path where trzsz-iterm2 is installed.

    which trzsz-iterm2
    

    Change the /usr/local/bin/trzsz-iterm2 below to the real absolute path of trzsz-iterm2.

  • Open iTerm2 -> Preferences... / Settings... -> Profiles -> (select a profile on the left) -> Advanced -> Triggers -> Edit -> [+]

    Name Value Note
    Regular Expression :(:TRZSZ:TRANSFER:[SRD]:\d+\.\d+\.\d+:\d+) No space at the end
    Action Run Silent Coprocess...
    Parameters /usr/local/bin/trzsz-iterm2 \1 No space at the end
    Enabled Checked
    • Don't check the Use interpolated strings for parameters at the bottom.

    • The /usr/local/bin/trzsz-iterm2 should be changed to the real absolute path of trzsz-iterm2.

    • Note that the Triggers should be configured for each Profile in use.

    • Triggers allows multiple lines, but only shows one line. Make sure don't copy a newline into it.

    iTerm2 Trigger configuration

  • Open iTerm2 -> Preferences... / Settings... -> General -> Magic, check Enable Python API.

    iTerm2 Enable Python API

  • Set ITERM2_COOKIE environment variable for faster startup.

    Open iTerm2 -> Preferences... / Settings... -> Advanced, filter by COOKIE, select Yes.

    iTerm2 Enable ITERM2_COOKIE

Progress Bar

Option 1: The cooler text progress bar

  • Screenshot of text progress bar using trzsz in iTerm2 with text progress bar

  • Upgrade iTerm2 to Build 3.5.20220503-nightly or higher.

  • Add -p text to the parameters of iTerm2 Trigger.

    /usr/local/bin/trzsz-iterm2 -p text \1
    

    Don't forget to change /usr/local/bin/trzsz-iterm2 to the real absolute path of trzsz-iterm2.

Option 2: The zenity progress bar

  • Screenshot of zenity progress bar using trzsz in iTerm2 with zenity progress bar

  • Install zenity

    brew install ncruces/tap/zenity
    
  • If Mac M1 install fails, try to install it with go:

    brew install go
    go install 'github.com/ncruces/zenity/cmd/zenity@latest'
    sudo cp ~/go/bin/zenity /usr/local/bin/zenity
    
  • ls -l /usr/local/bin/zenity should shows the zenity executable file or link. If not, create a soft link:

    sudo ln -sv $(which zenity) /usr/local/bin/zenity
    
  • If the progress dialog doesn't pop up in front, try upgrade zenity, and don't check iTerm2 -> Secure Keyboard Entry.

Default save path

If you want to automatically download files to the specified directory instead of asking each time.

e.g.: Automatically download files to /Users/xxxxx/Downloads

  • Using text progress bar, change /usr/local/bin/trzsz-iterm2 -p text \1 to:

    /usr/local/bin/trzsz-iterm2 -p text -d '/Users/xxxxx/Downloads' \1
    
  • Using zenity progress bar, change /usr/local/bin/trzsz-iterm2 \1 to:

    /usr/local/bin/trzsz-iterm2 -p zenity -d '/Users/xxxxx/Downloads' \1
    

Don't forget to change /usr/local/bin/trzsz-iterm2 to the real absolute path of trzsz-iterm2.

Dragging files and directories to upload

  • Upgrade iTerm2 to Build 3.5.20220806-nightly or higher.

  • Open iTerm2 -> Preferences... / Settings... -> Advanced, filter by files are dropped into, configure as:

    /usr/local/bin/trzsz-iterm2 -p text dragfiles \(filenames)
    

    iTerm2 enable drag files

Don't forget to change /usr/local/bin/trzsz-iterm2 to the real absolute path of trzsz-iterm2.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trzsz_iterm2-1.1.6.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trzsz_iterm2-1.1.6-py3-none-any.whl (28.9 kB view details)

Uploaded Python 3

File details

Details for the file trzsz_iterm2-1.1.6.tar.gz.

File metadata

  • Download URL: trzsz_iterm2-1.1.6.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for trzsz_iterm2-1.1.6.tar.gz
Algorithm Hash digest
SHA256 768008e87b1e3deac68c834deccc752378c5e6d07734bd2b650f90b52b202fe6
MD5 0af91f646ccb762b4e6268c2848e0a2b
BLAKE2b-256 7dbcbad2010906445e8a042af58809587927f74f40656121f26d0ccc63ac1a6c

See more details on using hashes here.

File details

Details for the file trzsz_iterm2-1.1.6-py3-none-any.whl.

File metadata

  • Download URL: trzsz_iterm2-1.1.6-py3-none-any.whl
  • Upload date:
  • Size: 28.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for trzsz_iterm2-1.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 52885d05867fc1020441c51f783fe3be839a4c3dc7e51ae31512b1c99aa87869
MD5 d74358b6c1672de73b1beccf2cf01fef
BLAKE2b-256 e6d5867a4069c03b89f13bf4308f51c138a6a159abf5697b2aad096d99358781

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1.6 This release

2 files

1.1.5

2 files

1.1.4

2 files

1.1.3

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 files

0.3.1

2 files

0.3.0

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

4 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page