mirror of
https://github.com/cheat/cheat.git
synced 2024-11-22 14:01:36 +01:00
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:
parent
b24e2b7fd2
commit
587dbf3c11
@ -1,10 +1,5 @@
|
|||||||
#
|
|
||||||
# Autocomplete for cheat.py
|
|
||||||
# Copyright (c) 2013, Jean-Philippee "Orax" Roemer
|
|
||||||
#
|
|
||||||
|
|
||||||
function _cheat_autocomplete {
|
function _cheat_autocomplete {
|
||||||
sheets=$(cheat | tail -n +17 | cut -d' ' -f1)
|
sheets=$(cheat -l | cut -d' ' -f1)
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
if [ $COMP_CWORD = 1 ]; then
|
if [ $COMP_CWORD = 1 ]; then
|
||||||
COMPREPLY=(`compgen -W "$sheets" -- $2`)
|
COMPREPLY=(`compgen -W "$sheets" -- $2`)
|
12
setup.py
12
setup.py
@ -5,18 +5,18 @@ import os
|
|||||||
|
|
||||||
setup(name='cheat',
|
setup(name='cheat',
|
||||||
version='1.0',
|
version='1.0',
|
||||||
summary='Create and view interactive cheatsheets on the command-line',
|
|
||||||
homepage='',
|
|
||||||
author='Chris Lane',
|
author='Chris Lane',
|
||||||
author_email='chris@chris-allen-lane.com',
|
author_email='chris@chris-allen-lane.com',
|
||||||
license='GPL3',
|
license='GPL3',
|
||||||
description='',
|
description='cheat allows you to create and view interactive cheatsheets\
|
||||||
platform='Posix',
|
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',
|
url='https://github.com/chrisallenlane/cheat',
|
||||||
packages=['cheatsheets'],
|
packages=['cheatsheets'],
|
||||||
package_data={'cheatsheets': [f for f in os.listdir('cheatsheets')
|
package_data={'cheatsheets': [f for f in os.listdir('cheatsheets')
|
||||||
if '.' not in f]},
|
if '.' not in f]},
|
||||||
scripts=['cheat'],
|
scripts=['cheat'],
|
||||||
data_files=[('/usr/share/zsh/site-functions', ['_cheat']),
|
data_files=[('/usr/share/zsh/site-functions', ['autocompletion/cheat.zsh']),
|
||||||
('/etc/bash_completion.d', ['cheat-completion.bash'])]
|
('/etc/bash_completion.d' , ['autocompletion/cheat.bash'])]
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user