[CLI Help] How to Minimize Typing

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

[CLI Help] How to Minimize Typing

#1 Post by vevy » Tue Oct 13, 2020 9:52 pm

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.
  • 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.
I do NOT have other accounts.

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

Re: [CLI Help] How to Minimize Typing

#2 Post by webfork » Fri Oct 16, 2020 7:45 pm

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.

vevy
Posts: 572
Joined: Tue Sep 10, 2019 11:17 am

Re: [CLI Help] How to Minimize Typing

#3 Post by vevy » Fri Oct 16, 2020 7:49 pm

Thanks! Please share if I missed something.
I do NOT have other accounts.

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

Re: [CLI Help] How to Minimize Typing

#4 Post by Midas » Sat Oct 17, 2020 6:02 am

Great! :sunglasses:

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

vevy
Posts: 572
Joined: Tue Sep 10, 2019 11:17 am

Re: [CLI Help] How to Minimize Typing

#5 Post by vevy » Sat Oct 17, 2020 11:47 am

True. I am just gathering anything that can help with CLI, even non-specific solutions.
I do NOT have other accounts.

Post Reply