# EasyKey.shellmenu **Repository Path**: timsengit/EasyKey.shellmenu ## Basic Information - **Project Name**: EasyKey.shellmenu - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-07-21 - **Last Updated**: 2026-07-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

Just a shell menu :hatched_chick:
(that simplified my work)

The time when you forget your favorite commands is over! :sweat_smile: EasyKey.shellmenu is a simple script to generate menus for command execution in your favorite shell environment. ✨ - Execute your favorite commands with a keystroke - Use single or double column menu - Call user-defined shell functions or immediately execute shell command - Return to menu once command or function completed - Log executed commands 👌 Increase your productivity and relax ! Please leave a star ⭐ if you like EasyKey.shellmenu. If you experience any problems, please let me know 😊 # Get started Easy ! 😎 1. Clone this repository. 2. Then look into `maven_example.sh` 3. Update that to write your own menu. 4. To start the menu run `bash maven_example.sh` in your terminal (or rename as you wish) 5. Optionally store the menu startup command on your function keys for easy access You can also look into [EasyKey.git](https://github.com/nschlimm/EasyKey.shellmenu/tree/main/EasyKey.git) `git.sh` or [EasyKey.kubectl](https://github.com/nschlimm/EasyKey.shellmenu/tree/main/EasyKey.kubectl) `kubectl.sh`. Two utilities based on EasyKey.shellmenu that I use in my daily work. # Syntax Use `menuInit` to initialize a new menu. Use `submenuHead` to structure your menu into sub sections. Use `menuItem` to define keys in single column menus. Use `menuItemClm` to define keys for multi column menus (allows more actions in the menu). Use `startMenu` to start your menu in your shell window. ``` menuInit submenuHead menuItem menuItemClm startMenu ``` # Simplest example menu The simplest menu requires this code: ``` source "./shellmenu.sh" menuItem c "Clean all" "mvn clean:clean" menuItem x "Compile" "mvn clean compile" menuItem t "Test" "mvn clean test" menuItem i "Install" "mvn clean install" startMenu ``` image # Maven demo menu (single column) The following example are taken from `maven_example.sh` for illustration. The Maven demo has its own heading and sub menu sections, but has only one column. ``` source "/path/to/shellmenu.sh" menuInit "Maven demo menu" submenuHead "Life cycle commands:" menuItem c "Clean all" "mvn clean:clean" menuItem x "Compile" "mvn clean compile" menuItem t "Test" "mvn clean test" menuItem i "Install" "mvn clean install" submenuHead "Also usefull:" menuItem d "Analyze dependencies" "mvn dependency:analyze" menuItem u "Clean compile force updates" "mvn clean compile -U -DskipTests" menuItem e "Show effective settings" "mvn help:effective-settings" menuItem r "Show local repo location" "mvn help:evaluate -Dexpression=settings.localRepository | grep -v '\[INFO\]'" menuItem l "Show global settings file location" showGlobalSettingFile startMenu ``` Result is the following menu: image # Example double column menu The following menu example is taken from the [EasyKey.kubectl](https://github.com/nschlimm/EasyKey.shellmenu/tree/main/EasyKey.kubectl) utility. The `kubectl` menu has many functions and sub sections in two columns to enable maximum amount auf commands in your menu. image # Tipp: sourcing shellmenu.sh Every menu script you will write needs to source `shellmenu.sh`. Here are several options for sourcing `shellmenu.sh` from your menu script: Option 1: Use absolute paths ``` # Source shellmenu.sh using absolute paths source "/path/to/shellmenu.sh" ``` Option 2: Set a variable for script directory ``` # Set the variable for the main script directory SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" # Source shellmenu.sh using the variable source "$SCRIPT_DIR/relative/path/to/shellmenu.sh" ```