icl: An interactive cheat sheet for your UNIX terminal

栏目: IT技术 · 发布时间: 5年前

内容简介:Have your favorite one-liners allways at your fingertips.

icl - interactive command library

icl is a user-friendly, interactive cheat sheet for your UNIX terminal.

Have your favorite one-liners allways at your fingertips.

icl: An interactive cheat sheet for your UNIX terminal

Installation

One line installation is provided for convenience, but you are encouraged to read the installation scripts.

Fish shell

curl -sSL https://raw.githubusercontent.com/plainas/icl/master/install_fish.sh | /bin/sh

Reload your fish config or start a new shell.

Note: Iy you are still using fish 2, yon need to define the keybinding to ''f_run_icl'' yourself.

Z shell

curl -sSL https://raw.githubusercontent.com/plainas/icl/master/install_zsh.sh | /bin/sh

reload zsh config or relaunch zsh.

Bash

curl -sSL https://raw.githubusercontent.com/plainas/icl/master/install_bash.sh | /bin/sh

Bash doesn't lend itself to the same level of interactivity and configurability as fish or zsh.

The command below will install a function to launch icl by pressing Ctrl+t , on your .bashrc . The chosen command is placed in your input bugger but it is also printed to stdout. This works but it is somewhat anoying. If you are bash user, this is good time to switch to fish.

Manual Installation

icl command is just a single python script with no dependencies on third party modules. By itself, it just launches the interactive search UI and, once you pick a command by pressing enter, will send it to SDOUT. This is not too useful. For a streamlined experience, install the helper functions for your shell and bind them to shortcut. They will launch icl on a keybind and, once you pick the command, place it in your input buffer. Check icl.fish , icl.bash.sh and icl.zsh.sh for ready to use helper functions and keybinding definitions.

  1. Download icl.py , set the execution bit and place it somewhere on your $PATH .

  2. Install the helper functions and keybinds for your shell.

Usage

Just press Ctrl+t and start typing.

Pick the command you want by pressing enter. To abort press Ctrl+C

A commands to your cheat sheet

Commmands are stored in ~/.config/icl/commands.txt

You can edit that file and add your favorite oneliners.

The format is self explanatory:

# description lines starts with '#', the command follows in the next line
fortune

# This line is here just to hold a brief command description
echo "This sample command echoes this!" 

# List all processes
ps aux

Bonus: icl as a TLDR client

The file tldr.txt includes all commands scrapped from tldr repository. If you want to be able to access them using icl, simply place them in your ''commands.txt''. You can do so by running the following command.

curl https://raw.githubusercontent.com/plainas/icl/master/tldr.txt >> ~/.config/icl/commands.txt

TODO: mention how to install on fish 2


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

大数据系统构建

大数据系统构建

Nathan Marz、James Warren / 马延辉、向磊、魏东琦 / 机械工业出版社 / 2017-1 / 79.00

随着社交网络、网络分析和智能型电子商务的兴起,传统的数据库系统显然已无法满足海量数据的管理需求。 作为一种新的处理模式,大数据系统应运而生,它使用多台机器并行工作,能够对海量数据进行存储、处理、分析,进而帮助用户从中提取对优化流程、实现高增长率的有用信息,做更为精准有效的决策。 但不可忽略的是,它也引入了大多数开发者并不熟悉的、困扰传统架构的复杂性问题。 本书将教你充分利用集群硬件优势的La......一起来看看 《大数据系统构建》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

正则表达式在线测试
正则表达式在线测试

正则表达式在线测试

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具