Skip to content

A simple util that launch tmux. Prompt when you need to choose a session

License

Notifications You must be signed in to change notification settings

caiych/tmux_prompt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Tmux prompt

A simple wrapper written in Python. Prompt to choose a session when you need.

Usage

Default usage

./prompt_tmux.py

Flags

./prompt_tmux.py -h
usage: prompt_tmux.py [-h] [--no_fast_start] [--no_prompt_again]

Prompt to choose a tmux session, cannot be run within a tmux window.

optional arguments:
  -h, --help         show this help message and exit
  --no_fast_start    Switch this flag to let the program shows all
                     sessions(including attached), and not skip choosing
                     anyway
  --no_prompt_again  Swith this flag to let the program exit after detach
                     sessions.

It rational to put something like this in your .bashrc or .zshrc:

if [[ ! $TERM =~ screen ]]; then
  exec /path/to/the/prompt_tmux.py # flags you prefer
fi

It's likely you've already have similar if but a simple tmux inside. Just replace tmux with the exec command above, and you are ready to go.

About

A simple util that launch tmux. Prompt when you need to choose a session

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages