Scroll to navigation

URLVIEW(1) General Commands Manual URLVIEW(1)

NAME

urlviewextract URLs, launch associated program

SYNOPSIS

urlview [-line] [file]…

DESCRIPTION

Scans each file (standard input stream if "-", the default) for URLs, then shows them in a curses(3) menu. (If the standard output stream is not a teletype: writes them, one per line, thereto.)

The menu allows viewing, searching, editing, and opening the URLs in the appropriate program.
URLs are shown in order, but multiple instances of the same URL are deduplicated case-insensitively!

If -line is given, where line is a decimal integer, then the first URL at or following that line is selected automatically, instead of the first.

Bindings

↓, , Scroll down
Select next URL.
↑, , Scroll up
Select previous URL.
Edit selected URL, confirm with ↵.
,
If EDIT is yes: run e. Then open selected URL with COMMAND or $BROWSER.
Mouse button 1
Select the URL under the cursor, then .
[0-]…
Jump to numbered URL, confirm with ↵. URLs are numbered from 1.
Home,
Select first URL.
End, ,
Select last URL.
Page Down, ^F
Next page.
Page Up, ^B
Previous page.
Enter regex to search URLs forward by; confirm with ↵.
Enter regex to search URLs backward by; confirm with ↵.
Search URLs forward with saved search (prompt if none).
Search URLs backward with saved search (prompt if none).
^L, ^G
Redraw screen.
, ,
Exit.

Full mutt(1)-style line editing is supported (incl. ^I (Tab) to erase to end of line). During entry, ^G cancels.

ENVIRONMENT

Overrides the built-in default for COMMAND if not specified in Configuration,
Behave as-if the standard output stream weren't a teletype.

FILES

The first extant of ~/.urlview, /etc/urlview/system.urlview is read. In this case, the defaults may be overridden through a simple line-based "setting whitespace value" format. Empty lines and lines starting with ‘’es are ignored.

Configuration

ere
Use the specified case-insensitive extended regular expression to match URLs. "\n", "", "", and "" are replaced with the new-line, the carriage return, the horizontal tab, and the form feed, respectively. The default is:
((http|https|ftp|gopher|gemini|mailto):(//)?[^ <>"\t]*|(www|ftp)[0-9]?\.[-a-z0-9.]+)[^ .,;\t\n\r<">\):]?[^, <>"\t]*[^ .,;\t\n\r<">\):]
    

prog
Run shell program, subject to VIA, when an URL is opened.
prog may contain multiple programs, delimited by ‘’s; they are tried in order until one exits 0.
Shadows $BROWSER. Defaults to "/etc/urlview/url_handler.sh".
argument
Run prog, followed by a space and the quoted URL. If prog contains "", that is instead replaced with the quoted URL.
This may leave the URL visible in to other users in /proc. This is the default.
environment
Set the URL environment variable to the URL, then run prog verbatim.
pipe
Run prog verbatim with a line containing the URL piped via the standard input stream.

These two are only useful with VIA= argument:
 
Unshadows $BROWSER even if COMMAND is set.
Allows 's in COMMAND: the URL to be opened is substituted as a quoted word using '. If prog is, for example "w3m '%s' -N", this would defeat this quoting, and . If you're sure your progs don't quote the URL — for example "lynx %s -cookie_file='/tmp/lynx cookies'" — it's safe to enable EXPERT.

no|yes
Edit the selected URL before opening it. The default is no.
no|yes
When at the last URL, allow ↓ to go to the first, and vice versa. The default is no.
yes|no
Enable mouse support. The default is yes.

yes, no, argument, environment, and pipe are case-insensitive.

EXIT STATUS

1 if no URLs were found, the effective COMMAND contained a ' and EXPERT wasn't enabled with VIA=argument. WRAP/EDIT/MOUSE/VIA received an invalid value, ere isn't a valid ERE, an unknown setting was specified, or a file couldn't be opened.

SEE ALSO

mutt(1), curses(3), regex(7), url(7)

February 16, 2024 urlview-ng 1d-1