Saturday, October 28, 2017

Installing cheat on Mageia6

Tecmint recently ran an article about a new way to obtain information about an application using cheat, an open-source interactive cheat-sheet  application. What the application does is provide a means of showing examples for a command. If none exist in the cheat database, cheat creates a blank cheat file in that name and opens it in a text editor of your choice so that you may add examples.

Instructions for installing it on "Linux Systems" assumes that "Linux" means "Debian" or "Redhat". Please read the article linked above and follow the installation instructions below to install cheat on Mageia6.

Mageia6 offers the choice of Python version 2 and Python version 3. Since cheat uses version 2, we'll be installing the version 2 python files. Python will already be installed on Mageia6, but if it is not, install it.

Install Python
# urpmi python

Install Pip
# urpmi python-pip

Install the dependencies for cheat
# urpmi python-docopt python-pygments

Install Git
# urpmi git

Clone the Git repository of cheat.
# git clone https://github.com/chrisallenlane/cheat.git

Change to the cheat directory and run setup.py.
# cd cheat
# python setup.py install

Check to see if cheat was installed correctly.
# cheat -v
cheat 2.2.1

Follow the article's instructions for setting environmental variables and adding autocompletion.

No comments: