Page 1 of 1

[CLI Help] How to Minimize Typing

Posted: Tue Oct 13, 2020 9:52 pm
by vevy
One of the reasons many people avoid the command line is having to type all the time.

This aversion is not entirely warranted. While some people are comfortable using it, you don't have to be doing it all the time to benefit from CLI tools.
  • Type once, use repeatedly.
  • Batch files: anywhere you can access (desktop, pinned to the taskbar, etc), where you can run it directly or drag and drop files on it.
  • SendTo Menu. Put the file in the SendTo folder, especially if it is something you use frequently; e.g. to convert flac to mp3.
  • In the context menu, directly, using the registry or a third-party app. If there are many of them, you can use the extended context menu.
  • Startup folder. If you want something to happen when you logon.
  • cmd.exe's autoexec/autorun. If you want something to happen whenever you open a console window.
  • Task scheduler. To run a command on specific times/triggers or on demand.
  • Shortcuts.
  • Using third party apps:
  • Some CLI tools are simple enough or use default settings if none were entered. Thus they can be used by simply dropping files on them, or copying them to StartTo.
  • Some CLI tools accept config files, so you may put your options there and just direct the CLI tool to that config file.
  • Many CLI tools have GUI frontends, some of which allow modifying the final command sent to the tool or saving presets.
Note: if you don't want to see a console window at all while the command is being run, see here.
---------------------------------------------------------------------------------------------
  • Minimizing typing in the command line session.
If you gotta use the command line directly, there are methods to make the experience easier and less typing-intensive (for example when entering file paths or arguments:
  • Batch files. Just as above, you can access the batch files from the terminal itself. Most modern consoles support drag-and-drop. You can also avoid having to type long paths. See below.
  • A feature of the Windows default shell (cmd) is that you can add "aliases" for command you like. See https://ss64.com/nt/doskey.html .
  • Environment variable. You can set a variable that gets automatically expanded into its value (the long command or path).
  • PATH environment variable. You can instruct Windows to look for an executable/file in certain folders so that you can only type the file name.
  • Open console window directly in the needed folder. For example, see here. This way you don't have to type long paths to the needed file(s).
  • Third-party apps:
    • Clink adds features like auto-completion, persistent history to CMD.
    • Alternative shells (interpreters). CMD replacements that try to make for a better user experience with things like auto-completion among others.
    • Third-party consoles (terminals) like ConsoleZ, ConEmu, cmder, etc. They also try to make your experience better by using custom colors, better copy/paste, etc.
    • Typing aids like text expanders.

Re: [CLI Help] How to Minimize Typing

Posted: Fri Oct 16, 2020 7:45 pm
by webfork
The "minimize typing" is the right subject heading since "speed up your work" isn't very specific. Anyway, I do loads of this stuff to speed up my processes but I never thought to write it all down.

Great post.

Re: [CLI Help] How to Minimize Typing

Posted: Fri Oct 16, 2020 7:49 pm
by vevy
Thanks! Please share if I missed something.

Re: [CLI Help] How to Minimize Typing

Posted: Sat Oct 17, 2020 6:02 am
by Midas
Great! :sunglasses:

Although I don't think this kind of help is CLI specific...

Re: [CLI Help] How to Minimize Typing

Posted: Sat Oct 17, 2020 11:47 am
by vevy
True. I am just gathering anything that can help with CLI, even non-specific solutions.