Bookmark terminal commands and easily retrieve them using tags

Marker It is the command bookmark manager of the console. The tool allows you to bookmark commands and command templates and easily retrieve them using the real-time fuzzy matcher.
Marker is described by its developers as a command palette for terminals, which includes a list of common commands for Linux and macOS, and requires Bash 4.3+ or Zshell and Python 2.7+ or 3.0+ to run.
This is a demo gif on the program’s GitHub project page:Bookmark manager for command console

This tool is useful for remembering previously used commands, just like traversing Bash history, but it works better because you can add descriptions (and add placeholders) for each bookmark, and save some of the commands encountered For future use. Your command bookmarks will be saved in text files in the following locations: ~/.local/share/marker/.
Marking features include:

  • Real-time fuzzy matcher for commands and descriptions, with a UI selector to easily select the desired command when multiple commands appear
  • Command templates: You can use placeholders to bookmark commands, and then use keyboard shortcuts to quickly place the cursor on these placeholders
  • Contains common commands from Linux and macOS from Linux tldr project
  • Keyboard shortcuts: Ctrl + space Search command, Ctrl + k Bookmark commands, and Ctrl + t Place the cursor on the next placeholder identified by “{{anything}}” to fill in the commands-these are customizable

The default key binding used to open the command panel, Ctrl + space,There seems to problem On some systems. On my Ubuntu 18.04 desktop, trying to use this key combination will cause -bash: bash_execute_unix_command: cannot find keymap for command error.
The solution lies in the customizable key binding function. MARKER_KEY_GET, MARKER_KEY_MARK with MARKER_KEY_NEXT_PLACEHOLDER Can be set as an environment variable to change the tag key binding (I will explain how to do this after installation instructions).

How to install Marker

Marker does not have any version. To install it, you need to get the latest code from Git. You can install Git in Debian, Ubuntu and Linux Mint using the following command:

sudo apt install git

Now you can get Marker Code and install using the following command:

git clone --depth=1 https://github.com/pindexis/marker ~/.marker 

~/.marker/install.py

You also need to mark in your source ~/.bashrc File-open ~/.bashrc Use a text editor and paste the following at the bottom of the file:

[[ -s "$HOME/.local/share/marker/marker.sh" ]] && source "$HOME/.local/share/marker/marker.sh"

Save file and source ~/.bashrc Use this command:

. ~/.bashrc

just in case Ctrl + space The keyboard shortcut (which should open the command panel) does not work for you, please change its shortcut. turn on ~/.bashrc Using a text editor, add the following line above the line where the source of the tag is:

export MARKER_KEY_GET='C-^'

This is for use Ctrl + ^ (6) As a key binding, you can change it to the desired key (although not all key combinations are available). Save file and source ~/.bashrc:

. ~/.bashrc

Similarly, you can change the keyboard shortcut for bookmarking commands (MARKER_KEY_MARK, The default binding is C-k), And place the cursor on the next placeholder (MARKER_KEY_NEXT_PLACEHOLDER, The default is C-t).
Try it now. Open the terminal and use Ctrl + ^ (If you change the key combination) to open the searchable command panel, or type some commands and press Ctrl + k Bookmark it. Types of marker remove Delete saved bookmarks.

Source

Sidebar