Especially when you have commands with arguments that you may not remember. Given that a lot of the time, you're repeating a command you've already previously typed - this can be a massive time saving. By pressing Ctrl+R, you enter history search mode allowing you to type and search your command history. ![]() Quickly search command history with Ctrl-R You can even create pre-defined tasks describing the split screen layout, so you can have different layouts for different projects or workflows. Conemu's split screen is perfect for this. I run each of these with the usual dotnet run, and I like to see the console output of each of these in a separate pane. NET Core services - Identity Server, a webapp, and an webapi. The above screenshot is of a project where I have three. It supports multiple tabs split screen views and much more! Here's an example screenshot showing a split screen layout. Even simple things like using the clipboard are a pain.Įnter ConEmu! If you're a Windows user, and you use the command line - this is a MUST! You can run different shells in it - eg. Whether you run CMD, PowerShell, or Bash - the default command line experience in Windows isn't great. You can obviously run them from Explorer, but it's not ideal. Then when running these scripts, it is more natural from the command line. If you're using PoshGit (see below), then that also provides tab completion of things like branch names, etc!Īnd when you're comfortable with the CLI, this helps you become more comfortable with scripting languages - whether that be Bash, Powershell, batch files, or whatever. If you start typing a Powershell command (when in Powershell of course!), pressing tab will also autocomplete the command name. For example, if you start typing a path, pressing tab will cycle through the available sub-directories based on what you've typed so far. If you start typing something, then press the tab key - depending on what it is, the shell will try and complete the word for you. That might just be my background as an object-oriented programmer though.įinally, most shells provide tab completion. Personally, I much prefer dealing with objects like you do in Powershell. So to fully take advantage of this, you need to become proficient in using tools like Sed and Awk. In Bash, whilst this chaining concept is extremely powerful - you are just dealing with plain text. Once you get comfortable with this - you start using it for a surprising number of things.Īs mentioned earlier, my personal preference is PowerShell - where you're passing objects down the pipeline. You can chain together many commands, where each command does a distinct thing, then passes it onto the next command. Those are obviously very simplistic examples. Who wouldn't want to run that command eh? Allowing you to chain multiple commands together to do various things. The ability to pipe commands together is also extremely powerful. Use the right tool for the job of course - but it turns out that the CLI is the right tool for a surprising number of jobs! I'm not saying the CLI is for everything. If you're only using graphical tools, then you're missing a very large subset of tooling you could be taking advantage of. ![]() Whilst our graphical tools play a big part in this - so also do our CLI tools. A big part of this, is automating bits of our workflow via tools and scripts. ![]() We're one of the few industries where we're luckily enough to be able to do this very easily. Īs developers, we're hopefully always looking for productivity wins to help us optimise our daily workflows. ![]() Why use a CLI?įirst of all, let's start with the why. being a big command line fan (albeit, perhaps not always for source control!), the last thing I wanted was to come across as anti-CLI! Far from it! So I thought a post about the CLI, together with a few tips to help you get the most out of it was in order!īe warned - I'm a Powershell fan, so this post is a bit bias - but a lot applies to other shells, eg. One of my recent blog posts - " Git GUIs versus the CLI", discussed why I think that a GUI is far better suited for source control than the CLI. 24 November 2017 - CLI, Powershell, Productivity
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |