1

I frequently have things I need to do in a fresh context to keep from messing up my workflow. Usually I open a fresh terminal, do whatever, and then by the end of the day I have a bunch of single-command terminal windows open.

Sometimes I remember to add && exit on the end of my command, but sometimes I don't.

Is there a way to run a single command via a hotkey? Mainly useful for umount /media/[tab][tab], but I could find other uses as well. Autocomplete would definitely be an asset.

  • Would aliases work for you? – Fiximan Jul 10 at 14:36
  • I don't think that's what I'm asking. I'm fine to type out the command, I'm just not happy with the terminal window hanging around afterwards, + all the overhead of launching a terminal emulator to type a few characters – Brydon Gibson Jul 10 at 14:46
  • I see. Well if the commands are always the same, one option would be to write small executable scripts for each, place them in a local bin directory and add that dir to your PATH in the .profile - It'll be loaded at login and you could use ALT+F2 -> <script_name>. – Fiximan Jul 10 at 14:51
  • Alt+F2 is what I was looking for. It has tab autocomplete, but unfortunately not the autocomplete utilities of applications (umount has its own implementation). Maybe post that as an answer? – Brydon Gibson Jul 10 at 14:55
2

For quickly executing commands, use ALT+F2 and type your command there.

Be careful as some functionalities like redirecting output into files might not be working as expected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.