bash completion · tmux-python/tmuxp@f5e326f · GitHub
Skip to content

Commit f5e326f

Browse files
committed
bash completion
1 parent 3e429eb commit f5e326f

4 files changed

Lines changed: 29 additions & 0 deletions

File tree

‎CHANGES‎

Lines changed: 1 addition & 0 deletions

‎pkg/tmuxp.bash‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env python
2+
# -*- coding: utf8 - *-
3+
4+
import os
5+
from tmuxp import cli
6+
7+
if __name__ == '__main__':
8+
9+
cline = os.environ.get('COMP_LINE') or os.environ.get('COMMAND_LINE') or ''
10+
cpoint = int(os.environ.get('COMP_POINT') or len(cline))
11+
12+
cli.complete(cline, cpoint)

‎setup.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def requirements(f):
4444
packages=['tmuxp', 'tmuxp.testsuite'],
4545
include_package_data=True,
4646
install_requires=requirements('requirements.pip'),
47+
scripts=['pkg/tmuxp.bash'],
4748
entry_points=dict(console_scripts=['tmuxp=tmuxp:main']),
4849
classifiers=[
4950
'Development Status :: 3 - Alpha',

‎tmuxp/cli.py‎

Lines changed: 15 additions & 0 deletions

0 commit comments

Comments
 (0)