mxl
v0.6.11
Published
Tmux launcher
Downloads
42
Readme
Table of Contents
Tmux Launcher
Sources tmux profiles by invoking source-file
helping to keep your tmux configurations portable.
This document is a brief introduction and guide, see mxl help
and mxl help <cmd>
for the man pages.
Install
npm i -g mxl
Usage
Usage: mxl <command> [-anrh] [-a|--all] [-n|--noop]
[-r|--recursive] [--color|--no-color] [-h|--help]
[--version] [-c|--directory=<dir...>]
[-p|--pattern=<ptn...>] [-s|--session=<name>] <args>
Tmux launcher.
Commands:
attach, att, a Attach to a session.
exec, ex Execute a command in a pane.
list, ls List configuration files.
source, so Source tmux configuration files.
alias, as Manage file aliases.
remove, rm Remove aliases by pattern match.
prune, pr Remove stale aliases.
index, idx Generate alias index.
kill, k Kill sessions, windows and panes.
install, i Install alias files.
view, vi View and edit configuration files.
quit Kill the tmux server.
help Show help for commands.
Options:
-c, --directory=[dir ...] Working directory contexts.
-p, --pattern=[ptn ...] Filter files by regexp pattern(s).
-a, --all Match all configuration files.
-n, --noop Print matched files, do not call source-file.
-s, --session=[name] Create session before source file(s).
-r, --recursive Match files recursively.
-h, --help Print help and exit.
--[no]-color Enable or disable terminal colors.
--version Print version and exit.
Report bugs to https://github.com/freeformsystems/mxl/issues.
Quick Start
First install a scratch template into $HOME
.
cd ~
mxl i @scratch
Modify ~/tmux.conf
to suit your needs then source it to create a scratch alias by username:
mxl .
Check the new alias exists:
mxl as
Then once you are in tmux
you can launch the scratch template in your home directory:
mxl
Or from any directory with:
mxl @<username>
Now go read the man pages!
Configuration Examples
See the templates for example tmux
configuration files, these files become the global aliases on installation.
Developer
Clone the repository, install deps (npm i
) and symlink the executable in $PATH
.
Install vim-tmux if possible, it's very useful.
When NODE_ENV
is set to devel
error stack traces are printed and man pages may be generated dynamically (NODE_ENV=devel mxl help
).
Test
To run the test suite:
npm test
Note that the working directory for test execution is set to fixtures/conf.
Run an individual test spec with TEST_SPEC
:
TEST_SPEC=test/spec/context npm test
Cover
To generate code coverage:
npm run cover
Alias
To rebuild the default rc file aliases from the files in tpl run:
npm run alias
This is automatically called on postinstall
to ensure shipped aliases are correct.
Docs
To build all documentation:
npm run docs
Manual
To build all man pages (requires manpage):
npm run manual
Readme
To build the readme file from the partial definitions (requires mdp):
npm run readme
License
Everything is MIT. Read the license if you feel inclined.
Generated by mdp(1).