---
name: "urlview"
section: "1"
platform: "linux"
package: "urlview"
version: "1e-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/urlview"
---

# urlview(1)

extract URLs, launch associated program

## NAME

**urlview** – extract 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)](/curses/3.md) 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

- ↓, **j**, Scroll down

  Select next URL.

- ↑, **k**, Scroll up

  Select previous URL.

- **e**

  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**-**9**\]…

  Jump to numbered URL, confirm with ↵. URLs are numbered from *1*.

- **y**

  Copy selected URL to *XSELECTION* with [xclip(1)](/xclip/1.md)/[xsel(1)](/xsel/1.md)/[wl-copy(1)](/wl-copy/1.md).

- Mouse button 3

  Select the URL under the cursor, then **y**.

- Home, **=**

  Select first URL.

- End, **\***, **G**

  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 ↵.

- **n**

  Search URLs forward with saved search (prompt if none).

- **N**

  Search URLs backward with saved search (prompt if none).

- **^L**, **^G**

  Redraw screen.

- **q**, **x**, **h**

  Exit.

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

## ENVIRONMENT

- BROWSER

  Overrides the built-in default for *COMMAND* if not specified in Configuration,

- URLVIEW\_DEBUG

  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

- REGEXP *ere*

  Use the specified case-insensitive extended regular expression to match URLs. "**\\n**", "**\\r**", "**\\t**", and "**\\f**" 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<">\):]
  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".
  Run
  prog,
  followed by a space and the quoted URL.
  If
  prog
  contains
  "%s",
  that is instead replaced with the quoted URL.
  This may leave the URL visible in to other users in
  /proc.
  This is the default.
  Set the
  URL
  environment variable to the URL, then
  run
  prog
  verbatim.
  Run
  prog
  verbatim
  with a line containing the URL piped via the standard input stream.
  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
  run the URL as code.
  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.
  Edit the selected URL before opening it.
  The default is
  no.
  When at the last URL, allow ↓ to go to the first, and vice versa.
  The default is
  no.
  Enable mouse support.
  The default is
  yes.
  yank
  (copy)
  to
  buf.
  If
  $WAYLAND_DISPLAY
  is set,
  selects between
  wl-copy -p
  if
  "primary"
  and
  wl-copy
  (clipboard)
  if anything else.
  If
  $DISPLAY
  is set, given to
  xclip -selection buf
  or
  xsel --buf
  directly
  (so the domain is likely primary|secondary|clipboard).
  The default is
  primary.
  yes,
  no,
  argument,
  environment,
  and
  pipe
  are case-insensitive.
  ```

- COMMAND *prog*

  - VIA **argument**

  - VIA **environment**

  - VIA **pipe**

  - These two are only useful with *VIA*=**argument**:

  - BROWSER

  - EXPERT

  - EDIT **no**\|**yes**

  - WRAP **no**\|**yes**

  - MOUSE **yes**\|**no**

  - XSELECTION *buf*

  ## 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)](/mutt/1.md), [wl-copy(1)](/wl-copy/1.md), [xclip(1)](/xclip/1.md), [xsel(1)](/xsel/1.md), [curses(3)](/curses/3.md), [regex(7)](/regex/7.md), [url(7)](/url/7.md)
