Chapter 7. URL Shortcuts in ELinks

Table of Contents

What it does
How it works
Alternative URI rewriting mechanisms

One extremely useful and convenient feature in ELinks, which may not be very well known, is so-called URL rewriting. If you give ELinks a URL (by passing it on the command line, through the -remote magic device or, most frequently, by typing it to the Goto URL dialog), it has the ability to mangle it in certain ways before processing it. This mangling is called URI rewriting.

What it does

The URI rewriting can expand certain URL shortcuts to complete URLs. For example, if you type sd to the Goto URL dialog, it will be rewritten to:

first, and then loaded. /.'s front page will be displayed.

Further, if you type g elinks to the Goto URL dialog, it will be rewritten to:

and then loaded, therefore, a Google search for the keyword elinks will be performed. Note that you can separate the g by either a space or a colon, so g:elinks will do the exact same thing.

A large number of those shortcuts are already defined for you. You can browse Protocols :: URI Rewriting :: Dumb/Smart prefixes in the Options Manager for a complete listing of already defined shortcuts (press the [Info] button on a shortcut to see what it will be rewritten to). See below for details on how to enable or disable this rewriting and how to define your own shortcuts.