Integrated the autocompletion scripts into the project, and rewrote the bash version to take advantage of the new -l option.

This commit is contained in:
Chris Lane 2013-09-14 10:27:53 -04:00
parent b24e2b7fd2
commit 587dbf3c11
3 changed files with 7 additions and 12 deletions

View File

@ -1,10 +1,5 @@
#
# Autocomplete for cheat.py
# Copyright (c) 2013, Jean-Philippee "Orax" Roemer
#
function _cheat_autocomplete {
sheets=$(cheat | tail -n +17 | cut -d' ' -f1)
sheets=$(cheat -l | cut -d' ' -f1)
COMPREPLY=()
if [ $COMP_CWORD = 1 ]; then
COMPREPLY=(`compgen -W "$sheets" -- $2`)

View File

@ -5,18 +5,18 @@ import os
setup(name='cheat',
version='1.0',
summary='Create and view interactive cheatsheets on the command-line',
homepage='',
author='Chris Lane',
author_email='chris@chris-allen-lane.com',
license='GPL3',
description='',
platform='Posix',
description='cheat allows you to create and view interactive cheatsheets\
on the command-line. It was designed to help remind *nix system\
administrators of options for commands that they use frequently, but not\
frequently enough to remember.',
url='https://github.com/chrisallenlane/cheat',
packages=['cheatsheets'],
package_data={'cheatsheets': [f for f in os.listdir('cheatsheets')
if '.' not in f]},
scripts=['cheat'],
data_files=[('/usr/share/zsh/site-functions', ['_cheat']),
('/etc/bash_completion.d', ['cheat-completion.bash'])]
data_files=[('/usr/share/zsh/site-functions', ['autocompletion/cheat.zsh']),
('/etc/bash_completion.d' , ['autocompletion/cheat.bash'])]
)