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 {
|
||||
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`)
|
12
setup.py
12
setup.py
@ -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'])]
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user