https://github.com/imomaliev/tmux-bash-completion
Tmux bash completion
https://github.com/imomaliev/tmux-bash-completion
bash-completion tmux
Last synced: 3 months ago
JSON representation
Tmux bash completion
- Host: GitHub
- URL: https://github.com/imomaliev/tmux-bash-completion
- Owner: imomaliev
- License: gpl-2.0
- Created: 2016-05-30T17:17:26.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-09-03T08:53:16.000Z (10 months ago)
- Last Synced: 2024-10-11T11:23:05.073Z (9 months ago)
- Topics: bash-completion, tmux
- Language: Shell
- Homepage:
- Size: 24.4 KB
- Stars: 285
- Watchers: 16
- Forks: 47
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
TMUX bash completion based on [bash-it's tmux completion](https://github.com/Bash-it/bash-it/blob/master/completion/available/tmux.completion.bash)
# Available completions
* commands
* files
* sessions
* windows# Installation
## Using [`bash-completion`](https://github.com/scop/bash-completion)
This installation method __requires__ [`bash-completion`](https://github.com/scop/bash-completion) 1.2 or higher.
1. Follow the installation instructions for [`bash-completion`](https://github.com/scop/bash-completion)
2. Determine the correct spot to place this plugin.
From the
bash-completion FAQ
> **Q. Where should I install my own local completions?**
>
> A. Put them in the completions subdir of `$BASH_COMPLETION_USER_DIR` (defaults to `$XDG_DATA_HOME/bash-completion` or `~/.local/share/bash-completion` if `$XDG_DATA_HOME` is not set) to have them loaded automatically on demand when the respective command is being completed. See also the next question's answer for considerations for these files' names, they apply here as well. Alternatively, you can write them directly in `~/.bash_completion` which is loaded eagerly by our main script.```sh
$ dir="${BASH_COMPLETION_DIR:-"${XDG_DATA_HOME:-"$HOME/.local/share"}/bash-completion"}/completions"
$ mkdir -p "$dir"
```3. Download the file
```sh
$ curl -fSsL "https://raw.githubusercontent.com/imomaliev/tmux-bash-completion/master/completions/tmux" > "${dir?error: dir not set: you must run the previous commands first}/tmux"
```4. Reload your configuration files
```sh
$ source ~/.bashrc
```## Without `bash-completion`
You can simply download the completion file and source it as part of your shell startup.
```sh
$ curl -fSsL "https://raw.githubusercontent.com/imomaliev/tmux-bash-completion/master/completions/tmux" > ~/.bash.tmux-bash-completion
$ echo 'source ~/.bash.tmux-bash-completion' >> ~/.bashrc
$ source ~/.bashrc # load it for your current session
```# TODO
* use `list-sessions -F`
* check all cases for `complete -o default`