Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

An interactive memory aid for one-liners

License

NotificationsYou must be signed in to change notification settings

plainas/icl

Repository files navigation

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

Have your favorite one-liners allways at your fingertips.

Example

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:If you are still using fish 2, you 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 launchicl by pressingCtrl+t, on your.bashrc .The chosen command is placed in your input bugger but it is also printed to stdout. This works butit 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. Checkicl.fish,icl.bash.sh andicl.zsh.sh for ready to use helper functions and keybinding definitions.

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

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

Usage

Just pressCtrl+t and start typing.

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

Add 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 linefortune# This line is here just to hold a brief command descriptionecho "This sample command echoes this!" # List all processesps aux

Change the keybind

If you installedicl with the one line snippets provided above. The keybind is defined in~/.config/fish/config.fish ,~/.bashrc or~/.zshrc depending on which shell you are using. Look for one of the following commands and replacectrl+t with another keybind on your preference.

# fishbind \ct f_run_icl# zshbindkey ^t w_run_icl# Bashbind '"\C-t":"f_run_icl\n"'

Bonus: icl as aTLDR client

The filetldr.txt includes all commands scrapped from tldr repository. If you want to be able to access them using icl, simply place them in yourcommands.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

  • accept an url as parameter to load an online library
  • includecheat andeg
  • integrate client tobropages
  • Improve TLDR scraper, get ridd of curly brackets around paremeters.

About

An interactive memory aid for one-liners

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp