i am actually programming a script where i can store commands in a cheatsheet (e.g. "git add .", "git merge", "docker compose-up" ....) - all commands that i need in my daily work.
see here: https://github.com/m1well/cheatsheet
now i have a question: is it possible to copy a command into the command line without any additional installations?
my actual idea is to implement it like the shell history -> add a number before each command and then i want to call it like this
$ my-script.sh -c 5
Where -c
stands for command parameter (if have several parameters already implemented) and the 5 stands for the command in line 5.
TL;DR: is it possible to copy a line from a file to the command line and then execute it by clicking enter?