From 044c63fb02b147fed1ade9a1b5cd7e9ed6d8aae6 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sun, 27 Oct 2013 08:07:18 +0800 Subject: [PATCH] v0.0.16 --- CHANGES | 9 +++++++++ README.rst | 29 +++++++++++++++++++++++++---- tmuxp/__init__.py | 2 +- tmuxp/cli.py | 2 -- 4 files changed, 35 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index 4c0a19c76ef..836733e716f 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,14 @@ tmuxp Changelog Here you can find the recent changes to tmuxp. +2013-10-27 +---------- + +- [cli] `argcomplete`_ overhaul for CLI bash completion. +- [cli] ``tmuxp load``, ``tmuxp convert`` and ``tmuxp import`` now support + relative and full filenames in addition to searching the config + directory. + 2013-10-26 ---------- @@ -244,3 +252,4 @@ initial .. _tmuxinator: https://github.com/aziz/tmuxinator .. _teamocil: https://github.com/remiprev/teamocil +.. _argcomplete: https://github.com/kislyuk/argcomplete diff --git a/README.rst b/README.rst index 9b33b8e3a76..486c9fc8636 100644 --- a/README.rst +++ b/README.rst @@ -32,14 +32,19 @@ Install ``tmuxp``: See: `Quickstart`_ -tmux bash completion -"""""""""""""""""""" +CLI Commands +"""""""""""" tmuxp uses ``switch-client`` for you if already in a TMUX client. .. code-block:: bash $ tmuxp attach-session # current sessions + +Kill session + +.. code-block:: bash + $ tmuxp kill-session # current sessions Load a session configuration from a YAML or JSON file. @@ -54,7 +59,15 @@ Convert a session config JSON <=> YAML: $ tmuxp convert # configs in config dir, current directory -See: `installing bash completion`_ +Experimental: Import configuration from `teamocil`_ or `tmuxinator`_: + +.. code-block:: bash + + $ tmuxp import teamocil # configs in ~/.teamocil dir + $ tmuxp import tmuxinator # configs in ~/.tmuxinator dir + +See `installing bash completion`_ to get bash, zsh and tcsh completion +working on your machine. load tmux sessions from yaml and json """"""""""""""""""""""""""""""""""""" @@ -65,12 +78,20 @@ Load from ``~/.tmuxp.yaml`` or ``~/.tmuxp.json`` in current directory. $ tmuxp load . -Load ``myconfig.yaml``. +Load ``myconfig.yaml`` from ``~/.tmuxp`` .. code-block:: bash $ tmuxp load myconfig.yaml +Load a relative or full config file (bash complete supports this too) + +.. code-block:: bash + + $ tmuxp load ./myconfig.yaml + $ tmuxp load ../myconfig.yaml + $ tmuxp load /var/www/mywebproject/myconfig.yaml + ``$ mkdir ~/.tmuxp`` and make a file ``~/.tmuxp/test.yaml``. .. code-block:: yaml diff --git a/tmuxp/__init__.py b/tmuxp/__init__.py index 16c5dd129dd..022a54ae165 100644 --- a/tmuxp/__init__.py +++ b/tmuxp/__init__.py @@ -20,4 +20,4 @@ import logging -__version__ = '0.0.15-dev' +__version__ = '0.0.16-dev' diff --git a/tmuxp/cli.py b/tmuxp/cli.py index c33f8170d31..998c99ee1e4 100644 --- a/tmuxp/cli.py +++ b/tmuxp/cli.py @@ -468,8 +468,6 @@ def cli_parser(): will check launch a ~/.pullv.yaml / ~/.pullv.json from the cwd. will also check for any ./*.yaml and ./*.json. ''' % (cwd_dir + '/', config_dir), - #).completer = ConfigCompleter - #).completer = argcomplete.completers.FilesCompleter(allowednames=('.yaml', '.json'), directories=False) ).completer = ConfigCompleter(allowednames=('.yaml', '.json'), directories=False) load.set_defaults(callback=subcommand_load)