Skip to content
generating bash/zsh/powershell/fish autocompletions from yml file
Python Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
completions
docs
sufler
tests
.bumpversion.cfg
.gitignore
.travis.yml
LICENSE
MANIFEST.in
README.md
config.cfg
install.bash
requirements-dev.txt
requirements.txt
setup.py
tox.ini

README.md

Sufler

Sufler - is the tool to help you with generating bash/zsh/powershell/fish autocompletions from YAML file.

Build Status coveralls Documentation Status

Documentation

Usage

gif

| => sufler --help
Usage: sufler [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  init     initialize Sufler directory and config file
  install  install completions
  run      run command from <Run >

Quickstart:

pip install sufler

or

bash -c "$(curl -fsSL https://raw.githubusercontent.com/limebrains/sufler/master/install.bash)"

you will have directory in your home dir where you can install your custom completions.

/Users/pythonicninja/.sufler/
├── completions
│   ├── npm.yml
│   └── pip.yml
└── .config

there is repo which accepts PR's with common completions sufler-completions - github.com

Key ideas:

Example yml file:

'pip': &pip
    'install': &install
        '--constrain': &constraint
            '<File>': *install
        '--build': &build
            '<File>': *install
        '--no-deps': *install
        '--install-option':
          '<Exec> wget https://pypi.python.org/simple/ -O ~/.sufler/python_completions -c -q && cat ~/.sufler/python_completions | cut -d ">" -f 2 | cut -d "<" -f 1 | grep "^TREE~1.*"': *install

full raw file

Please notice special names of keys such as:

  • <Exec>

  • <File>

  • <Regex>

  • <Run>

All of them are documented in details - readthedocs.io

Origin of the name

Name comes from (pol. sufler - wiki)

The prompter (sometimes prompt) in a theatre is a person who prompts or cues actors when they forget their lines or neglect to move on the stage to where they are supposed to be situated.

sufler

You can’t perform that action at this time.