From 3b2cf3a5eeab5ba3d34bf80d9fbd618ec2dd1529 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 9 Oct 2024 18:48:02 +0200 Subject: First public release --- README.md | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 README.md (limited to 'README.md') diff --git a/README.md b/README.md new file mode 100644 index 0000000..8b7800b --- /dev/null +++ b/README.md @@ -0,0 +1,90 @@ +# Fast Memo Shell + +'Fast Memo Shell' is a tool designed to boost productivity when using a ZSH shell. + +It allows users to enhance their current shell with a customized list of commands by using the Alt+L key combination or by typing the command 'f'. + +## How to install + +### Dependencies + +FMS (Fast Memo Shell) a ZSH script based on three tools: [skim](https://github.com/lotabout/skim), [yq-go](https://github.com/mikefarah/yq) and [bat](https://github.com/sharkdp/bat). + +All of them should be installed and available in your PATH with the commands 'sk', 'yq', and 'bat'. + +For example, you can use Nix to install them: + +```sh +nix-env -i skim bat yq-go +``` + +Or use Parabola GNU/Linux-libre binaries (a compatible method for a Kali Linux VM out of the box): + +```sh +wget https://www.parabola.nu/packages/extra/x86_64/skim/download/ -O /tmp/skim.tar.zst +sudo tar --zstd -xvf /tmp/skim.tar.zst -C /usr/local/bin --strip-components=2 usr/bin/sk + +wget https://www.parabola.nu/packages/extra/x86_64/go-yq/download/ -O /tmp/yq.tar.zst +sudo tar --zstd -xvf /tmp/yq.tar.zst -C /usr/local/bin --strip-components=2 usr/bin/yq + +wget https://www.parabola.nu/packages/extra/x86_64/bat/download/ -O /tmp/bat.tar.zst +sudo tar --zstd -xvf /tmp/bat.tar.zst -C /usr/local/bin --strip-components=2 usr/bin/bat +``` + +### FMS + +You should download the latest version and extract it in your home directory: +```sh +wget "https://git.hackade.org/ben/fms/archive/main.tar.gz" -O fms.tar.gz +tar zxvf fms.tar.gz -C ~ +``` + +Then add the following line to your ZSH configuration file: +```sh +echo 'source ~/fms/integration.zsh' >> ~/.zshrc +``` + +## How to configure + +Each command is stored in the file commands.yaml. To add new commands or modify existing ones, edit commands.yaml with the following fields: +```yaml + - cmd: + lang: + tags: + desc: +``` + +The tags and desc fields are only used to provide information to easily find your command when you search for it. +The lang field is used for syntax highlighting. + +Here is an example of an entry: +```yaml + - cmd: find / -perm -u=s -type f 2>/dev/null + lang: sh + tags: security + desc: Search for executables with SUID permission +``` + +Then, to update the database and apply the changes, run the following commands: +```sh +~/fms/fms.sh update +``` + +Fast Memo Shell comes with a list of commands as examples, but you are highly encouraged to update it according to your needs. + +## How to use + +To launch Fast Memo Shell, there are two possibilities: press Alt+L or enter the command 'f'. + +To select the right command, you can: + +* Enter a string to find your command. +* Use the up and down arrow keys. +* Enter '' to display only the commands containing this substring. +* Once you have the desired command selected, just press Enter. + +Fast Memo Shell can also display all available manuals. To switch between both modes, use Shift+Left and Shift+Right arrows." + +## Demo + +![Demo](demo.gif) \ No newline at end of file -- cgit v1.2.3