It would be cool if Konsole could bookmark a list of commands which the user could expend by selecting a command by mouse/shortcut or simply add the previous executed command. For example as an average user I found myself typing a number of repeated commands for example : updating/upgrading, install/remove packages, diagnostic of boot time/errors/logs, cleaning var/logs... and sometimes I forgot how to type them so I always spent a quite time to search inside blogs to find them again. So it would great if Konsole could keep a saved list of those commands and when user click on a shortcut or menu item a window with search bar appears where user could type word(s) and search in the saved list of commands, then the selected item could be paste to Konsole.
What about adding your commands as functions to ~/.bashrc or your shell configuration file? this way you also have tab completion.
(In reply to tcanabrava from comment #1) > What about adding your commands as functions to ~/.bashrc or your shell > configuration file? this way you also have tab completion. The old days of messing with config files are gone, and Linux desktop is not the server version, also the average users don't like to edit those hidden config files, and KDE is the only Desktop manager which able to overcome the manual editing and gives the user complete control using graphic interfaces. I don't even memorize the commands I type, I search them then copy/paste.
but you do know the commands that you need to type, adding a menu that executes arbitrary shell commands is a security risk - think for instance that someone changed the `copy` action on your menu to `rm -rf /*` I won't implement such feature, if you want to run commands on the command line you can implement the functions that will run the commands in the correct file, ~/.bashrc for instance. The reasons: - It's easier to verify what's the function you are calling (just look at the source of ~/.bashrc and you have your function) - I won't add a security risk to konsole - Users should be expected to learn the tool that they are using, creating a function in shell is the proper way to add "typing a repeated commands" But thinking a bit on this, we can actually make this userfull: - A side panel with "shortcuts" that do show what the command is and a title / comment for it. - a way to verify for errors (running shellsheck on the file?) are you willing to help develop such feature?
(In reply to tcanabrava from comment #3) > but you do know the commands that you need to type, adding a menu that > executes arbitrary shell commands is a security risk - think for instance > that someone changed the `copy` action on your menu to `rm -rf /*` > > I won't implement such feature, if you want to run commands on the command > line you can implement the functions that will run the commands in the > correct file, ~/.bashrc for instance. > > The reasons: > - It's easier to verify what's the function you are calling (just look at > the source of ~/.bashrc and you have your function) > - I won't add a security risk to konsole > - Users should be expected to learn the tool that they are using, creating a > function in shell is the proper way to add "typing a repeated commands" > > But thinking a bit on this, we can actually make this userfull: > - A side panel with "shortcuts" that do show what the command is and a title > / comment for it. > - a way to verify for errors (running shellsheck on the file?) > > are you willing to help develop such feature? I wish I could, I know only some Java/JavaFX/C# basics. I think you didn't understand well what I meant, What I mean not creating a menu with list of commands, I said to have a separate window with search bar at top and list of commands at center, the list contains only commands content as texts, so when user type something in the search bar the commands that correspond to entered text appear bellow, then user selects the correct item by pressing enter or double click with mouse which will just copy the content of the command to the terminal then the user executes the command in the terminal by pressing enter. I demonstrated what I meant with Copyq and Konsole in the attached video. (unfortunately Copyq saves all copied texts from desktop in one list and does not have specific list for only commands)
Created attachment 130171 [details] demo bookmark commands Konsole
Created attachment 130172 [details] Use fuzzy search with Ctrl + R You don't need that in konsole because this is what fuzzy search gives you.
(In reply to tcanabrava from comment #6) > Created attachment 130172 [details] > Use fuzzy search with Ctrl + R > > You don't need that in konsole because this is what fuzzy search gives you. Thanks that was really helpful and I learned a new tool fzf, I never used it before and was only using text files to store my long commands for future usage. Thanks for your great guidance ;)
If you are going to run a (long) command frequently, you would want to set it as an alias in your ~/.bashrc: > alias custom-pacman-update='sudo pacman-mirrors --country-config --bar-parameter --another-parameter && sudo pacman -Syyu' Afterwards you can just type "custom-pacman-update" instead of searching the history.
(In reply to 2wxsy58236r3 from comment #8) > If you are going to run a (long) command frequently, you would want to set > it as an alias in your ~/.bashrc: > > > alias custom-pacman-update='sudo pacman-mirrors --country-config --bar-parameter --another-parameter && sudo pacman -Syyu' > Afterwards you can just type "custom-pacman-update" instead of searching the > history. That's really cool, I created an alias called "java8" for an old extracted JRE 8 which some JavaFX8 apps still need to run, and it worked perfectly instead of switching the whole default JRE each time for only a specfific app.
Also, Konsole has quickcommands plugin which might help in addition to the other comments on how to achieve this. Let us know if those don't work for you.
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!