[CLI Help] How to Minimize Typing

Discuss anything related to command line tools here.
Post Reply
Message
Author
User avatar
vevy
Posts: 795
Joined: Tue Sep 10, 2019 11:17 am

[CLI Help] How to Minimize Typing

#1 Post 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.
Last edited by vevy on Sat Oct 24, 2020 11:38 pm, edited 3 times in total.

User avatar
webfork
Posts: 10818
Joined: Wed Apr 11, 2007 8:06 pm
Location: US, Texas
Contact:

Re: [CLI Help] How to Minimize Typing

#2 Post 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.

User avatar
vevy
Posts: 795
Joined: Tue Sep 10, 2019 11:17 am

Re: [CLI Help] How to Minimize Typing

#3 Post by vevy »

Thanks! Please share if I missed something.

User avatar
Midas
Posts: 6705
Joined: Mon Dec 07, 2009 7:09 am
Location: Sol3

Re: [CLI Help] How to Minimize Typing

#4 Post by Midas »

Great! :sunglasses:

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

User avatar
vevy
Posts: 795
Joined: Tue Sep 10, 2019 11:17 am

Re: [CLI Help] How to Minimize Typing

#5 Post by vevy »

True. I am just gathering anything that can help with CLI, even non-specific solutions.

Post Reply