How to use marks in os x’s terminal for easier navigation

Computing & Information Services

Using Symbols and Diacritical Marks on OS X

A diacritical mark is often used by foreign languages and fireside poets to denote an accent on a letter. For instance, you will be marked down on a French paper for writing apercu instead of aperçu, and where would political theorists be without being able to distinguish between role and rôle?

To type diacritics in a Mac, first hold down the Option key on the keyboard and then strike a regular character key as indicated below. To create a ç and some other characters, this is all you need. Hold down shift as well as option if you want to make a capital Ç . This process is denoted below as Option + c (or C) .

For some marks, such as the ´ or the ˆ , a highlighted accent with no letter will appear on your screen at this point. Release both keys, and then type the letter which you want to carry the diacritical, and the letter should appear. Alternatively, you can press and hold the letter which you wish to add a diacritical mark to, and an accent menu will appear from which you can press the number that corresponds to the desired character.

Below is a table of common diacritical marks and symbols:

To find many other characters and symbols, choose Key Caps from the Apple menu (in OS 9) or Applications > Utilities (in OS X) for a diagram of your keyboard and selecting, for instance, Wingdings. You will see the characters or symbols as they would appear on your keyboard if you had switched to that font in your word processing program. Hit Caps Lock to see even more symbols. Highlight the characters that you want to use in the Key Caps window, copy them ( Command + c ) and paste them into your document ( Command + v ).

For more information and for a keyboard map of common symbols, visit the Apple Support page.

Every now and then a question mark may appear in OS X, indicating that the system is confused about something and resulting in the user feeling the same way.

In several situations when running OS X you may encounter question marks. Of course there should definitely be one somewhere on your keyboard (likely next to the right Shift key), but there are other instances where question marks may appear in the system where there shouldn’t be one. Usually these indicate an instance in which the system cannot locate a specified file, location, or other resource and in its confusion shows a question mark.

When OS X boots, it will by default use the boot volume that is set in the PRAM, but if that setting is not valid or nonexistent, then the system will poll each drive for a suitable boot environment and attempt to boot from the first one found. When the system is in the process of looking for a boot volume, it will display a blinking question mark to indicate that a boot volume has not yet been found.

If there are no boot volumes found, the system will continue to show the question mark; however, sometimes people may see the question mark only briefly before the system boots normally. This is because even though there is a valid boot partition for the system to use, it is not set as the default boot drive, so the system has to poll each drive until it finds the boot volume. To prevent this, go to the Startup Disk system preferences and select the default boot drive.

Finder Toolbar

You can link to files and folders in the Finder toolbar, but if they are removed then a question mark will show in their place when the Finder is relaunched.

Another source of question marks in OS X is the toolbar at the top of each Finder window. While you can customize the toolbar to rearrange items and add some optional buttons, you can also add custom links to documents, folders, and even applications. While the Dock is the recommended location for storing links to common applications, some applications (such as those that will open the current Finder folder in the Terminal) can be useful to have in the Finder toolbar and can be put there by simply dragging the icon to the toolbar.

If the linked file in the toolbar is then removed, the system will not be able to locate it and will show a question mark in the toolbar in place of the file’s icon. When this happens, you can either restore the moved or deleted file, or remove the link from the toolbar by holding the Command key while dragging it off the toolbar.

The Dock will also show question marks for missing items (the Dock’s database may retain the icon for the missing file).

Similar to the Finder toolbar, the Dock will also show a question mark if a file, folder, or application that is linked in it is no longer accessible. This may happen if you have deleted the file, if the file is stored on a networked or external volume that is not mounted, or sometimes if you run an applicaiton uninstaller that removes the file but does not remove it from the Dock. If this happens you can drag the question mark off the Dock and it will disappear with a cloud poof.

Have you found other locations where OS X shows similar question marks? If so then let us know below in the comments.

Questions? Comments? Have a fix? Post them below or e-mail us!
Be sure to check us out on Twitter and the CNET Mac forums.

I decided to try again, in python, using pymupdf as a backend, and dropping support for iTerm2 and focusing just on kitty’s more robust graphics support. The preliminary results are snappier, and it should be easy to add more powerful features:

termpdf is a barebones graphical PDF (and DJVU and TIFF and CBR and CBZ and JPG and PNG and GIF and BMP) viewer that runs in your terminal.

Right now, it runs in

  • iTerm 2.9 or later
  • kitty

And has experimental support for

It is a ridiculous hack—a bash script wrapped around some special terminal escape codes and a bunch of command line tools. But it works well enough for me to be useful.

Running in Kitty:

How to use marks in os x’s terminal for easier navigation

Running in iTerm:

How to use marks in os x’s terminal for easier navigation

Let me start with the tl;dr instructions.

Make sure you are running a recent version of Kitty or iTerm.

Install terminal dimensions :

Install dependencies. On OSX,

On Archlinux and its derivatives

termpdf is also available in the Arch User Repository. You can install it using your favorite AUR helper program, which should also handle the dependencies, including terminal_dimensions . For example, using yay:

Download the termpdf and tpdfc scripts, make them executable, and put them in your path:

You will need iTerm version 2.9 or later, or Kitty, version greater than 0.6.1, or, if you want to play around, a terminal with sixel support. iTerm support has been around for awhile. It should be pretty stable if a bit slow. Kitty support is new and significantly faster than iTerm—especially if you use the terminal_dimensions helper app.

To use with Kitty, be sure that the kitty executable is in your path.

A previous version of the script tried to support X11 using w3mimgdisplay . That got complicated and it didn’t work, so I removed it. But recent changes to the code probably make it easier to implement.

This is a tiny command line tool written in C that reports terminal dimensions, both in character cells and in pixels, e.g.,

This is helpful, because standard cli tools don’t report pixel dimensions. But in many emulators, including iTerm, the pixel dimensions will be misreported as 0 and 0:

This is too bad, because pixel dimensions are super helpful! Install this, and image rendering in Kitty is much faster. Also, you will need this if you want to play around with the sixel support.

Poppler, djvulibre, libtiff, unrar, imagemagick, ghostscript

The script uses pdfseparate and pdfinfo , from Poppler to manipulate PDFs, ddjvu and djvudump , from DJVULibre, to manipulate DJVU files, and tiffutil and tiffinfo , to manipulate TIFF files. It uses unrar and unzip to unpack CBR and CBZ files. It uses ImageMagick’s convert and identify . And it uses Ghostscript to convert PDFs to PNGS, because it is faster, and offers more control, than Poppler’s pdfcairo .

On OS X, you can install all these things by running:

If you run the script from Bash 4.x, it supports marks. OS X still ships with Bash 3.x, so,

I’ve added basic support for viewing Microsoft Office (docx, xlsx, pptx) and LibreOffice (odt, ods, odp) files. The script converts them to PDF using LibreOffice, and then displays the resulting PDF. For this to work, you’ll need to have a copy of LibreOffice installed in your /Applications folder.

TODO: As written, this probably only works on OS X.

If you want to try out the experimental sixel support, be sure you have terminal_dimensions installed. You also need to install

and make sure that the img2sixel command is in your path. Then try:

Here is a screenshot of the best results I can get using a version of xterm built with sixel support on OS X:

How to use marks in os x’s terminal for easier navigation

termpdf and tpdfc are bash scripts. Put them somewhere in your path and make sure they have the appropriate permissions (i.e., chmod u+x termpdf ).

should be a file in one of the supported formats or a path to a directory containing images.

Format is determined by extension. Supported multipage are formats:

Supported single image formats are

It should be trivial to add support for any format that Imagemagick supports that doesn’t require special handling.

Directories, along with common archive formats (ZIP, RAR, and TAR), are treated as multipage documents. Directories are searched recursively by find , and displayed in the order found. The –depth option specifies the depth of find ‘s recursive search.

By default, termpdf uses Kitty’s image rendering if it is available, and otherwise tries to use iTerm’s image rendering. You can override this behavior by specifying one of -sixel , -kitty , or -iterm .

These commands are all set by the keys() function. You can override them in the config file if you want.

There is also mostly undocumented support for : style commands, e.g.,

:first go to first page :last go to last page :goto 20 go to page 20 :print :yank :search :next :gui open the document in your default viewer :text all :text page :refresh :reload :rotate 90 :crop :marks list marks :quit quit

This is mostly useless from within the software, because bash’s read command doesn’t support customizable autocompletion when called within scripts. But it is useful when using tpdfc .

Controlling termpdf using tpdfc

You can issue : style commands to a running instance of termpdf using the command tpdfc . For example,

will flip to page 5. If more than one instance of termpdf is running, you can specify the instance you wish to control either by PID or just by number:

To list all available instances,

You can put any commands you want into $HOME/.config/termpdf/config , which is sourced during the setup process. This allows you, among other things, to override the key mappings and tweak the print settings.

You can also put commands in $HOME/.config/termpdf/exithook , which will be sourced before the script exits.

Earlier versions of the script worked well with tmux on iTerm. The current version does not. I’m not sure why.

The make command only works if you have a Makefile in the same directory as the PDF. It would be nice to support a configurable make command.

There is no robust error checking. This is just a bash script. So occasionally it will just crash or fart or do something unexpected.

  • rewrite in real language (using ncurses?).
  • rewrite kitty support using escape codes instead of kitty icat

Emacs users already know about pdf-tools. It would be amazing to replicate its level of functionality for a pdf viewer in the tmux+vim workflow.

  • fbpdf: a pdf viewer for the framebuffer with vim-like navigation.
  • jfbview: another pdf viewer for the framebuffer.
  • imgcat: the sample imgcat implementation from the developer of iTerm2. Works in tmux. Doesn’t provide control over width and height of image.
  • term-img: javascript node library for viewing images in iTerm2. Also offers a command line tool. Doesn’t work in tmux.
  • imgcat-cli: a javascript node image viewer for iTerm2 (fork of term-img). Doesn’t work in tmux.
  • termimg: uses w3mimgdisplay .


barebones graphical pdf/djvu/cbr/image viewer that works inside iTerm2 2.9+ and Kitty

How to use, troubleshoot, and repair your Mac

The Terminal is generally reserved as an environment for advanced configuration of your Mac, but there are those who resort to it on a regular basis and use it in conjunction with OS X’s graphical interface to make optimal use of the system. If you do so, then you might find yourself periodically wanting to launch an application, either directly from the command line, or from an automated action like a script. In addition, you can use this feature to launch multiple instances of a standard OS X program, or run it as a different user, such as root, which can give you access to the system in ways you might otherwise not have.

The classic way

As with general Terminal syntax, you can launch an executable script or binary file from the Terminal by simply entering its full path. However, to do so for an OS X app with a graphical interface, you will need to specify the app’s executable file within the application package. In most cases, this will be a subdirectory called /Contents/MacOS/ that contains an executable with the same name as the app. For instance, opening TextEdit in the Applications folder will require you run the following command:

This can be useful for troubleshooting problems with the program, since you will see console output (errors, warnings, and sometimes other activity) output directly to the Terminal window hosting the program, as opposed to having to use the Console utility.

If you would like to run the app as a different user (e.g., the root account), then you can first switch user accounts in the Terminal with the “su” command, or use “sudo” before specifying the path to the Mac OS application, and this will launch the program as root (note that this might not always work):

In addition, keep in mind that when opened in this manner, the Terminal window will be hosting the program, so it must remain open while the program is running—if you close the Terminal window, you will force-quit the program you have opened.

Using the “open” command

One of OS X’s unique Terminal commands is the “open” command that allows you to handle files, programs, and URLs in sometimes unique ways. The benefit of this program is, similar to using the Terminal for directly launching an app in the “classic” way; however, it does have two benefits. First, it is easier to use, and second, it does not require the Terminal remain open:

In this command, replace “appname” with the name of your desired app, and it should launch. Note that by default this command will, similar to the OS X graphical environment, only open one instance of an app, so if the program is already open then this command will switch to it. However, you can use this command to open another instance of the program, by adding the “-n” flag:

Keep in mind that as with the classic approach, multiple instances of an application running at the same time under the same user account may have odd consequences with supporting services that the application uses; however, for simple programs and utilities it can be useful to run another instance as root, in order to overcome permissions limitations with your current user account. Also consider apps like the Calculator, where it might be useful to have more than one calculation going at a time.

With the command run multiple times, you will open multiple instances of the program.

2 thoughts on “ How to launch OS X apps via the Terminal ”

Note that you can also “launch a document” with open:

will, if necessary, launch the default app for .txt files (or the app specific to somefile.txt file if you changed its association) and open somefile.txt in it. Same for .rtf, .webarchive, .numbers, etc.

Want to open a Finder window on the directory (folder) you’re currently in (your current working directory) in Terminal?

Hi Topher, great write-up!

Question, I’m not sure why but I’m no longer able to open TextEdit the classic way using sudo in Yosemite.

When I run the “sudo /Applications/” command I get prompted for the admin password but then nothing happens, although it does seem like TextEdit tries to run but it never shows up, then you get back to the prompt in Terminal.

I wonder if this is because of an update? I’m using OS X 10.10.4.

How to use marks in os x’s terminal for easier navigation

Dec 9, 2019 · 6 min read

In this tutorial I will show you how you can install the ZSH shell on any operating system and customize it with ohmyzsh framework and PowerLeve10K theme.

For Windows 10

Enabling WSL and installing Ubuntu.

How to use marks in os x’s terminal for easier navigation

How to use marks in os x’s terminal for easier navigation

  1. Make sure your windows is updated.

2. Then search for “Turn Windows features on or off” in the start menu.

3. Now you mark the “Windows Subsystem for Linux” and hit ok.

4. It will ask you to restart your system, so just do it.

5. Now you will have to install ubuntu from the windows store.

6. Just launch the ubuntu app and you are ready to go.

7. You have installed the linux now follow linux guide to continue

Installing ZSH shell for linux distros

  1. Install zsh with your package manager

2. Make your default shell

3. Restart your terminal and you are ready to go (In linux ubuntu you may need to logout and login again)

4. If it’s asking for selecting an option press 0

Type echo $SHELL to verify the shell it should print /usr/bin/zsh

Further setup will be same for all Operating System.

For Mac OS X

How to use marks in os x’s terminal for easier navigation

If you are using latest version of MacOS which is Catalina. Then your default shell would be ZSH only. You will be seeing a % symbol on your terminal.

If you are not on MacOS Catalina

  1. Install ZSH through homebrew.

2. Make it your default shell

3. Restart your terminal and you are ready to go

4. If it’s asking for selecting an option press 0

Type echo $SHELL to verify the shell it should print /usr/bin/zsh

Installing Oh My Zsh

How to use marks in os x’s terminal for easier navigation

Just paste this command in your terminal and it will install Oh My Zsh.

Install PowerLeve10K theme

How to use marks in os x’s terminal for easier navigation

We will clone the repository into the custom theme folder

Download and install Nerd Patched fonts

How to use marks in os x’s terminal for easier navigation

Download and install FuraMono Nerd Font . It’s best and works everywhere. For linux (Ubuntu) you will need the FiraMono otherwise your terminal may not show up the font.

You can also download other fonts which you like but make sure its patched with icons (Look for complete folder). If you can’t find it you can patch it yourself. But remember different fonts may not completely align and fit perfect everywhere.

Download Plugins for autosuggestion and syntax highlighting

How to use marks in os x’s terminal for easier navigation

/.zshrc file to use the PowerLeve10K theme, Awesome Patched font, Autocorrection, Autosuggestion and Syntax highlighting.

You can use any editor you nano or vim. We will use micro here, It is a great editor which allows you to easily edit the files. You can easily install it by running this command sudo curl | bash

Or in linux you can try with snap

Now you can use it like

Find the ZSH_THME and replace it with

Also add this line below to use Nerd Patched fonts

If you want to enable auto correction then find uncomment the line by removing # from

Now we will add plugins so scroll down a little till you find

And now add the plugins which we downloaded, like this

Now we are done so save the file by pressing Ctrl+Q then hit Enter

We are almost done but not yet 🥳

For Windows 10 you will have to install the Windows Terminal (Preview)

How to use marks in os x’s terminal for easier navigation

Once you installed it, just open it and you will see PowerShell shell. You need to go to settings by clicking on the dropdown. It will open a JSON setting file in notepad.

How to use marks in os x’s terminal for easier navigation

Now scroll down and try to find the name Ubuntu and add the font like this

How to use marks in os x’s terminal for easier navigation

Now you need to save this file so just press Ctrl + S

Now you can open the Ubuntu terminal from the dropdown, it will ask you for the setup which you can easily do. We will look further

For Mac OS X users

Just go to the terminal preferences

How to use marks in os x’s terminal for easier navigation

Now select your theme whatever you want and then click on the Font Change Button and search for FuraMono, just select it and close the window.

How to use marks in os x’s terminal for easier navigation

After that make sure you have made your theme to default and restart your terminal. If you want more themes you can download here MacOS Terminal Themes .

There are many themes just double click to change what you like. I really liked the Ocean Material and Pencil Dark, make sure you make those default and change the fonts.

For Linux users

You will also have to go to preferences of your terminal and change to the custom font which you installed. If it doesn’t shows up you can try this.

How to use marks in os x’s terminal for easier navigation

You can set any font using dconf (e.g. in dconf-editor ), under /org/gnome/terminal/legacy/profiles:/:

If you like you can also change the themes.

You will need to run p10k configure command to setup your terminal looks. Just follow the steps which you see on screen. In the last select option 3 which is verbose and then hit Y

How to use marks in os x’s terminal for easier navigation

If you use VS code terminal then you will also have change the fonts. So just go to setting and search for terminal.integrated.fontFamily and add FuraMono Nerd Font . Restart and you are done 🙂

How to use marks in os x’s terminal for easier navigation

If you are getting any error like

Then just open your

/.zshrc file again

and add this line before the # Path to your oh-my-zsh installation.

So it will look like

Restart your terminal and everything should be fixed.

How to use, troubleshoot, and repair your Mac

Identifying files by their icon is perhaps more important than being able to locate the programs you use, since for the most part you will likely be browsing your files when using the Finder on your Mac. However, there are some instances where the icons for your files will just appear as generic white documents, leaving you unable to distinguish them and less likely to identify them. This may happen for a number of reasons, including using incompatible third-party cleaner tools for your Mac, or problems with restoring from backups. If you are finding yourself in this situation, then there are several things you can do to restore your icons.

Rebuild OS X’s Launch Services

OS X associates programs and files with the system’s launch services, which gathers a list of the programs on your system and the file types that they can handle, and then links them so when you open a file, the appropriate program is launched to handle it.

To fix this specific problem, you can try resetting the system’s launch services, which can be done by running the following command in the OS X Terminal. Note that the command is buried deep in the system so it is very long; however, you should be able to copy the following multi-line version of it and paste it into the Terminal to run it:

In addition to launch services, OS X contains a few system caches that handle application icons so the system does not have to constantly pull them from programs you have installed. These are buried in the system’s temporary folder structures for the system and user accounts, but can be found and removed by running the following command in the Terminal

When done, reboot your Mac into Safe Mode (hold the Shift key at startup) and then restart normally. Note that after removing these caches and rebuilding the launch services, that you may have to open the programs again before the files these programs handle will regain their icons.

The info window’s Open With section contains an option to “Change All” documents of this type to open with the selected program.

Specify the handler for the files

Another quick option that may reset the file’s status in the system’s launch services is to re-associate it with its handling program, which can be done in the information window for any file of its type:

  1. Select the file and press Command-i to get information on it
  2. Expand the Open With section
  3. Choose any program from the drop-down menu other than the current one, even if the current is the desired one.
  4. Click the “Change All” button and confirm this action
  5. Re-select your initial (or desired) program, and again click “Change All.”

Uninstall duplicate applications

Conflicts for handling different files may occur if you have (or have had) multiple versions of the same program on your system. For instance, if a program was at version 1.0 and you installed a separate instance of version 2.0, then files associated with version 1.0 may not open if you remove this program, even though version 2.0 is present. Granted specifying these files to open within version 2.0 should have the system make the proper association; however, an easy way to avoid such conflicts is to remove older software versions unless you absolutely need them.

Sometimes applications may not be in expected places, two of which are the Macintosh HD > Applications folder, and the Users > username > Applications folder (not created by default); however, they can be anywhere else if you have moved them, even on external hard drives.

Reinstall the application for the affected file types

Finally, you might try reinstalling the programs you have for handling these files. If there is damage to your files’ current installations, then the system might not be able to access the icon resources for them. A quick solution to this and similar problems is to re-download the program, or otherwise reinstall it.

6 thoughts on “ Fix your Mac showing generic icons for files ”

What to if the problem is with folder icons becoming generic file icons?

Strange breaks, it seems to me that something went wrong with your copy pasting of a filepath to the ls register file.

I resolved this issue yesterday for a user by changing the View Options icon size from 24×24 to a higher number (36×36.) Not sure why this resolved the issue though, as I did rebuild the Launch Services first to no avail.

Just installed El Cap yesterday and most of the icons had gone generic. Was going to use ONYX to resolve by resetting Launch Services as I had in the past, but saw your comment, tried it, and it worked! Much easier – thank you for publishing.

BTW – I reduced the size and then went back to the original size and everything stuck.

The command that resets Launching Services works fine. However, the command

sudo find /var/folders/ -name -exec rm <> \

gives me the error message

find: -exec: no terminating “;” or “+”

Thank you! Running the commands in Terminal worked like a charm!

How to use marks in os x’s terminal for easier navigation

Advanced Mac users may appreciate using the Homebrew package manager, which greatly simplifies the process of installing command line software and tools on a Mac.

For example, if you want to easily install favorite command line tools on a Mac like cask, htop, wget, nmap, tree, irssi, links, colordiff, or virtually any other familiar unix command line utility, you can do so with a simple command. Homebrew downloads and builds the package for you.

This is obviously aimed at more technically savvy Mac users who spend a lot of time at the command line. While there’s no particular issue for novice users installing Homebrew on their Mac, the odds of novices finding it useful are slim, unless they intend to embark on learning the command line environment. Contrast that to power users who practically live in a terminal environment, whether longtime Mac users or migrating to the platform from the Windows or Linux world, who will immediately see the value of Homebrew.

Requirements for Installing Homebrew on Mac OS

prerequisites to installing Homebrew on a Mac include the following:

  • A Mac running Mac OS X 10.10 or later, though earlier versions are sort of supported
  • Command Line Tools must be installed on the Mac (either independently or through Xcode)
  • Knowledge of the command line and using bash or zsh

Assuming you’re interested in installing Homebrew and meet those requirements, then the rest is equally straight forward.

How to Install Homebrew on Mac OS

The simplest way to install Homebrew is through ruby and curl, accomplished with a single command. This approach is the same for installing Homebrew in all supported versions of Mac OS and Mac OS X.

  1. Open the “Terminal” application, found in /Applications/Utilities/
  2. Enter the following command into a single line of the terminal:

For MacOS Catalina, macOS Mojave, and MacOS Big Sur:
/bin/bash -c “$(curl -fsSL”

For macOS High Sierra, Sierra, El Capitan, and earlier:
/usr/bin/ruby -e “$(curl -fsSL”
How to use marks in os x’s terminal for easier navigation

Installation of Homebrew will take a while depending on the speed of your Mac and internet connection, as each necessary package is downloaded and installed by the script.

When complete, you will see an “Installation successful!” message.

How to use marks in os x’s terminal for easier navigation

Now you’re ready to install software packages through Homebrew, or you can read the help documentation with the following command:

How to use marks in os x’s terminal for easier navigation

Installing Software Packages through Homebrew on Mac

Installing packages with Homebrew is super easy, just use the following syntax:

brew install [package name]

For example, to install wget through Homebrew you could use the following syntax:

brew install wget

Simple, easy. Once complete you can run wget as usual.

How to use marks in os x’s terminal for easier navigation

A quick side note; Homebrew is not the only way to install command line software, you can install command line tools on a Mac yourself and then compile and make software independently. For example, we discuss installing wget on Mac OS without Homebrew here and it uses the typical configure and make process. There’s nothing wrong with that approach (and arguably it might be preferable for users who want limited packages and a slimmer footprint) but if you’re accustomed to a package manager like dpkg, apt-get, or rpm you’ll almost certainly appreciate and prefer to use Homebrew.

How to Disable Homebrew Analytics Tracking

Homebrew now defaults to using anonymized behavioral analytics tracking. If you do not want to participate in that or you’d just rather disable the feature to reduce network traffic or for privacy purposes, or whatever other reason, you can run the following command after successfully installing Homebrew on a Mac. This will opt out of Homebrew analytics:

brew analytics off

Hit return and after a moment or so the analytics tracking in Homebrew will be disabled.

How to Remove HomeBrew from a Mac

If you have installed Homebrew but later decide you want to remove Homebrew from a Mac for some reason or another, you can uninstall it with another ruby script run from the command line, choose the script that aligns with your version of MacOS:

Removing Homebrew in MacOS Catalina, macOS Big Sur, and MacOS Mojave:

/bin/bash -c “$(curl -fsSL”

Removing Homebrew from MacOS High Sierra, Sierra, El Capitan, and earlier:
ruby -e “$(curl -fsSL”

Alternatively, you could download that “uninstall” script directly and run it yourself.

How to use marks in os x’s terminal for easier navigation

Work with text often? You can navigate, select, and manipulate text faster than ever before by remembering these twelve keyboard shortcuts.

6 Text Navigation Shortcuts

The first group of keyboard shortcuts allow for quickly moving around text:

  • Jump to beginning of a line – Command+Left Arrow
  • Jump to end of a line – Command+Right Arrow
  • Jump to beginning of current word – Option+Right Arrow
  • Jump to end of current word – Option+Right Arrow
  • Jump to beginning of all text – Command+Up Arrow
  • Jump to end of all text – Command+Down Arrow

By adding a shift key to the above shortcuts, we are given six new tricks that allow for quick text selection of lines, words, and entire documents.

6 Text Selection Shortcuts

The next group of keyboard shortcuts allow for quickly highlighting and selecting elements of text:

  • Select text to beginning of a line – Shift+Command+Left Arrow
  • Select text to end of a line – Shift+Command+Right Arrow
  • Select text to beginning of current word – Shift+Option+Right Arrow
  • Select text to end of current word – Shift+Option+Right Arrow
  • Select text to beginning of all text – Shift+Command+Up Arrow
  • Select text to end of all text – Shift+Command+Down Arrow

These shortcuts should work in all versions of Mac OS X and with all Cocoa based apps, including Safari, Chrome, TextEdit, Pages and the iWork suite, and most other Mac apps and text editors.

Update: These keyboard shortcuts will also work with iOS devices that have a keyboard attached via Bluetooth or through a dock. Thanks for pointing this out Steve!

This is an update to the original post. I added more details and fixed a couple of bugs, and made it so that it should now be easier to create and install the script, without need for Vi.

1) Login with telnet (I know, you should really use SSH, but I haven’t gotten around to that yet so I can’t give advice there). You must login as root, not simply as administrator. That is login:root, password:same password as admin.

2) All the following script lines should be simply copied and pasted (even with comments) directly in the telnet window, all of them in one go. All the file paths are absolute, so it doesn’t matter in which directory you are when you paste. Everything will be created and “installed” automatically. It works fine from the system telnet in the in OS X, I don’t know in other terminals. If not, you will need to use Vi to create the script file.

3) You need to create the watermark image file separately. It does not have to be a .gif, thankfully composite is clever enough to handle the image format automatically. The watermark image file then needs to be saved anywhere the /root/watermark link points to. In my case:

Image with watermark on the bottom right

4) This should do it, if there are issues let me know. If you want to remove everything and go back to the default configuration this is the “uninstall” script. Copy and paste it in the terminal window just like above: