Python implements a shell-based Quick query tool

Source: Internet
Author: User

Requirement: Recently, I have to refer to the configuration documents/wiki/history/Notes/google to get a server address or password. It may be a complicated command that is commonly used but not too easy to call, I am also annoyed when the number of times is too high, which is inefficient and time-consuming and cannot afford to hurt

 


Modify: write frequently-used things that cannot be remembered to the text configuration. In shell, use a command + keyword to get the desired content.

 


Implementation Method:

1. Configuration File Format: yaml

Configure keywords, multi-line content, read, very convenient to use python

 


2. Create the index file cheatsheet. py

Easy to handle

 


3. install. sh

Install

 


After implementation:



 

 

Subsequent improvements:

1. Fuzzy match

2. Read the index instead of creating the index each time

3. More friendly prompts

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.