

- #Cool terminal codes for mac text for mac how to#
- #Cool terminal codes for mac text for mac update#
- #Cool terminal codes for mac text for mac manual#
- #Cool terminal codes for mac text for mac free#
#Cool terminal codes for mac text for mac free#
In this case it will helpfully say 'done' when it's finished.įeel free to make it say 'booyah!' if you feel like your day needs more celebrations of tiny wins in it.ĭevs love two things: laptop stickers and snazzy terminal commands.
#Cool terminal codes for mac text for mac update#
Notice the between the commands? This will basically run the apt update to completion and then invoke the next command. Using your terminal's ability to chain commands, you can use your speech utility tool of choice to tell you when a long running process has finished. spd-say is the default Ubuntu text-to-speech utility. This one can be achieved a number of ways, and with various tools on each platform. Notice the use of grep to narrow down the search? Work smart, not hard! spd-say history | grep pg_restore will show me every time I've used the pg_restore command, with the exact flags and arguments I had to use.

Why is this useful? Well, if, like me, you are super forgetful, the history command can show you what you've done before to jog your memory.įor example, whenever I have to restore a database back-up, I can never remember the syntax. History simply returns every command you have ever typed into your terminal. For example, if you wanted to look at your Rails routes, but you were only interested in those related to admin you could do this: With other commands that produce lots of terminal output, you can pipe it to grep error to do the same. Grep can narrow down your search to only the relevant lines. log file for an error, it can be hard to see amongst all irrelevant output.
:max_bytes(150000):strip_icc()/002_view-hidden-mac-folders-using-terminal-2260776-5c2ea73546e0fb0001415cda.jpg)
Grep allows you to return the relevant lines from text output that match a particular pattern you pass it.įor example, if you are looking in a long. This is a very well known 'trick' but it's incredibly useful all the same. as usual, your files have already been added, so no need to use the git add command. To add or remove specific files from your staging area in git, simply press u. Tig status acts like git status except that it also allows for the same navigation as tig, and it also allows you to add files to staging easily from the command line.īoth commands can be navigated using the j and k keys to move up and down, and pressing enter will open the information about the file (such as the commit diff). Tig acts like git log, but allows you to navigate up and down the log, and examine the contents of each commit from the command line.
#Cool terminal codes for mac text for mac manual#
For example, while git log and git status give me useful information, it requires more manual git commands to do anything useful with that information. One of gits shortcomings for me is the lack of interactivity available in some of the basic actions. The eagle-eyed among you may have noticed that this is git spelled backwards, and indeed tig is an excellent git utility. Tig and tig status are probably the tools I use most often in my day-to-day work. If you have ever forgotten to use your sudo privilege when doing something that needs your administrator credentials (such as apt updatefor example), then sudo !! is a handy way to correct it without having to type the whole command again. Sudo !! (or as I like to shout SUDO BANG BANG) will repeat the last command you typed, but with sudo in front of it. This is adapted from my recent YouTube video, which you can view to see these tricks in action! sudo !!
#Cool terminal codes for mac text for mac how to#
If you want to mention how to achieve similar results on MacOS or Windows, or there are other terminal tricks you would like to share, let me know in the comments below. Here are my five favourite terminal commands and utilities (in no particular order), to help you feel like the wizard you aspire to be! This is based on Ubuntu, but should be similar across other platforms (with maybe a little Googling). There are plenty of beginner tutorials around that help you learn command line basics, such as cd, ls, pwd and so on.but what about that fancy magic you've seen more experienced developers use?
