File tree Expand file tree Collapse file tree 10 files changed +119
-72
lines changed Expand file tree Collapse file tree 10 files changed +119
-72
lines changed Original file line number Diff line number Diff line change 11(completion)=
22
3- # Completion
3+ (completions)=
4+
5+ (cli-completions)=
6+
7+ # Completions (experimental)
48
59``` {note}
6- See the [click library's documentation on shell completion](https://click.palletsprojects.com/en/8.0.x/shell-completion/ ) for the most up to date way of connecting completion for tmuxp.
10+ See the [shtab library's documentation on shell completion](https://docs.iterative.ai/shtab/use/#cli-usage ) for the most up to date way of connecting completion for tmuxp.
711```
812
9- :::{tab} Bash
10-
11- _ ~ /.bashrc_ :
13+ Provisional support for completions in tmuxp 1.17+ are powered by [ shtab] ( https://docs.iterative.ai/shtab/ ) . This must be ** installed separately** , as it's ** not currently bundled with tmuxp** .
1214
13- ``` bash
15+ ``` console
16+ $ pip install shtab --user
17+ ```
1418
15- eval " $( _TMUXP_COMPLETE=bash_source tmuxp ) "
19+ :::{tab} bash
1620
21+ ``` bash
22+ shtab --shell=bash -u tmuxp.cli.create_parser \
23+ | sudo tee " $BASH_COMPLETION_COMPAT_DIR " /TMUXP
1724```
1825
1926:::
2027
21- :::{tab} Zsh
22-
23- _ ~ /.zshrc_ :
28+ :::{tab} zsh
2429
2530``` zsh
31+ shtab --shell=zsh -u tmuxp.cli.create_parser \
32+ | sudo tee /usr/local/share/zsh/site-functions/_TMUXP
33+ ```
2634
27- eval " $( _TMUXP_COMPLETE=zsh_source tmuxp ) "
35+ :::
2836
37+ :::{tab} tcsh
38+
39+ ``` zsh
40+ shtab --shell=tcsh -u tmuxp.cli.create_parser \
41+ | sudo tee /etc/profile.d/TMUXP.completion.csh
2942```
3043
3144:::
Original file line number Diff line number Diff line change 44
55Convert between YAML and JSON
66
7+ ``` {eval-rst}
8+ .. argparse::
9+ :module: tmuxp.cli
10+ :func: create_parser
11+ :prog: tmuxp
12+ :path: convert
13+ ```
14+
15+ ## Usage
16+
717```` {tab} YAML -> JSON
818
919```console
@@ -22,12 +32,3 @@ $ tmuxp convert /path/to/file.json
2232
2333tmuxp automatically will prompt to convert ` .yaml ` to ` .json ` and
2434` .json ` to ` .yaml ` .
25-
26- ## Reference
27-
28- ``` {eval-rst}
29- .. click:: tmuxp.cli.convert:command_convert
30- :prog: tmuxp convert
31- :commands: convert
32- :nested: full
33- ```
Original file line number Diff line number Diff line change 77Use to collect all relevant information for submitting an issue to
88the project.
99
10+ ``` {eval-rst}
11+ .. argparse::
12+ :module: tmuxp.cli
13+ :func: create_parser
14+ :prog: tmuxp
15+ :path: debug-info
16+ ```
17+
18+ ## Usage
19+
1020``` console
1121
1222$ tmuxp debug-info
@@ -17,12 +27,3 @@ environment:
1727...
1828
1929```
20-
21- ## Reference
22-
23- ``` {eval-rst}
24- .. click:: tmuxp.cli.debug_info:command_debug_info
25- :prog: tmuxp debug-info
26- :commands: debug-info
27- :nested: full
28- ```
Original file line number Diff line number Diff line change 11(edit-config)=
22
3+ (cli-edit)=
4+
35# tmuxp edit
46
57``` {eval-rst}
6- .. click:: tmuxp.cli.edit:command_edit
7- :prog: tmuxp edit
8- :commands: edit
9- :nested: full
8+ .. argparse::
9+ :module: tmuxp.cli
10+ :func: create_parser
11+ :prog: tmuxp
12+ :path: edit
1013```
Original file line number Diff line number Diff line change 11(cli-freeze)=
22
3+ (cli-freeze-reference)=
4+
35# tmuxp freeze
46
7+ ``` {eval-rst}
8+ .. argparse::
9+ :module: tmuxp.cli
10+ :func: create_parser
11+ :prog: tmuxp
12+ :path: freeze
13+ ```
14+
15+ ## Usage
16+
517Freeze sessions
618
719``` console
@@ -23,12 +35,3 @@ Tmuxp will offer to save your session state to `.json` or `.yaml`.
2335If no session is specified, it will default to the attached session.
2436
2537If the ` --force ` argument is passed, it will overwrite any existing config file with the same name.
26-
27- (cli-freeze-reference)=
28-
29- ``` {eval-rst}
30- .. click:: tmuxp.cli.freeze:command_freeze
31- :prog: tmuxp freeze
32- :commands: freeze
33- :nested: full
34- ```
Original file line number Diff line number Diff line change 77## From teamocil
88
99``` {eval-rst}
10- .. click:: tmuxp.cli.import_config:command_import_teamocil
11- :prog: tmuxp import teamocil
12- :nested: full
10+ .. argparse::
11+ :module: tmuxp.cli
12+ :func: create_parser
13+ :prog: tmuxp
14+ :path: import teamocil
1315```
1416
1517```` {tab} YAML
@@ -33,9 +35,11 @@ $ tmuxp import teamocil /path/to/file.json
3335## From tmuxinator
3436
3537``` {eval-rst}
36- .. click:: tmuxp.cli.import_config:command_import_tmuxinator
37- :prog: tmuxp import tmuxinator
38- :nested: short
38+ .. argparse::
39+ :module: tmuxp.cli
40+ :func: create_parser
41+ :prog: tmuxp
42+ :path: import tmuxinator
3943```
4044
4145```` {tab} YAML
Original file line number Diff line number Diff line change 2121import
2222convert
2323freeze
24-
2524```
2625
2726``` {toctree}
2827:caption: Diagnostic
2928:maxdepth: 1
3029
3130debug-info
32-
3331```
3432
3533``` {toctree}
36- :caption: More
34+ :caption: Completion
3735:maxdepth: 1
3836
3937completion
4038```
39+
40+ (cli-main)=
41+
42+ (tmuxp-main)=
43+
44+ ## Command: ` tmuxp `
45+
46+ ``` {eval-rst}
47+ .. argparse::
48+ :module: tmuxp.cli
49+ :func: create_parser
50+ :prog: tmuxp
51+ :nosubcommands:
52+
53+ subparser_name : @replace
54+ See :ref:`cli-ls`
55+ ```
Original file line number Diff line number Diff line change 22
33(tmuxp-load)=
44
5+ (tmuxp-load-reference)=
6+
57# tmuxp load
68
9+ ``` {eval-rst}
10+ .. argparse::
11+ :module: tmuxp.cli
12+ :func: create_parser
13+ :prog: tmuxp
14+ :path: load
15+ ```
16+
17+ ## Usage
18+
719You can load your tmuxp file and attach the vim session via a few
820shorthands:
921
@@ -136,14 +148,3 @@ $ tmuxp load [filename] --log-file [log_filename]
136148``` console
137149$ tmuxp --log-level [LEVEL] load [filename] --log-file [log_filename]
138150```
139-
140- ## Reference
141-
142- (tmuxp-load-reference)=
143-
144- ``` {eval-rst}
145- .. click:: tmuxp.cli.load:command_load
146- :prog: tmuxp load
147- :commands: load
148- :nested: full
149- ```
Original file line number Diff line number Diff line change 1+ (cli-ls)=
2+
13(ls-config)=
24
35# tmuxp ls
46
7+ List sesssions.
8+
59``` {eval-rst}
6- .. click:: tmuxp.cli.ls:command_ls
7- :prog: tmuxp ls
8- :commands: ls
9- :nested: full
10+ .. argparse::
11+ :module: tmuxp.cli
12+ :func: create_parser
13+ :prog: tmuxp
14+ :path: ls
1015```
Original file line number Diff line number Diff line change 11(cli-shell)=
22
3+ (tmuxp-shell)=
4+
35# tmuxp shell
46
57``` {eval-rst}
6- .. click:: tmuxp.cli.shell:command_shell
7- :prog: tmuxp shell
8- :commands: shell
9- :nested: none
8+ .. argparse::
9+ :module: tmuxp.cli
10+ :func: create_parser
11+ :prog: tmuxp
12+ :path: shell
1013```
1114
1215## Directly enter commands
1518$ tmuxp shell -c ' python code'
1619```
1720
18- ## Example
19-
2021``` {image} ../_static/tmuxp-shell.gif
2122:width: 100%
2223```
You can’t perform that action at this time.
0 commit comments