packages feed

opn-0.1.0: opn.1

.TH "OPN" "1" "24 Aug 2014" "Opn User Manual" "Version 0.1.0"
.SH NAME
.PP
opn \- open files and URLs with associated programs
.SH SYNOPSIS
.PP
opn (\-\-version | [\-\-dry\-run] PATHS...)
.SH DESCRIPTION
.PP
The opn command lets you open files and URLs with associated programs.
It\[aq]s intended to "just work" and to be trivial to configure.
.PP
The configuration resides in \f[C]~/.opnconfig\f[]; here\[aq]s an
example:
.IP
.nf
\f[C]
[browser]
browser:\ chromium

[associations]
mupdf:\ \ \ \ .pdf
emacs:\ \ \ \ .lhs\ .hs\ .py\ .c
chromium:\ .png\ .jpg\ .html\ .txt
mpv:\ \ \ \ \ \ .avi\ .mpg\ .mp4
djview:\ \ \ .djvu
\f[]
.fi
.PP
Both \f[C][browser]\f[] and \f[C][associations]\f[] sections must be
present and nonempty.
The \f[C][browser]\f[] section should in fact always have exactly one
key, namely \f[C]browser\f[].
Comments must start at the beginning of the line and start with
\f[C]\[aq];\[aq]\f[] or \f[C]\[aq]#\[aq]\f[].
.PP
If asked to open a file with no matching extension, or a file without an
extension, \f[C]opn\f[] tries to be a bit smart.
For example, a header file, say \f[C]foo.h\f[], would be opened in
\f[C]emacs\f[].
The reason is that header files have mime type \f[C]text/x\-c\f[], the
same type as \f[C]\[aq].c\[aq]\f[] files, and thus \f[C]opn\f[]
"guesses" that \f[C]\[aq].h\[aq]\f[] files also should be opened with
\f[C]emacs\f[].
.SH OPTIONS
.TP
.B \-\-dry\-run
Display the command, or commands, that would be executed, then exit.
.RS
.RE
.TP
.B \-\-version
Display version information.
.RS
.RE
.TP
.B \-\-help
Display a short help message.
.RS
.RE
.SH EXAMPLES
.PP
Open \f[C]opn.hs\f[] in the application associated with the extension
\f[C]\[aq].hs\[aq]\f[]:
.IP
.nf
\f[C]
opn\ opn.hs
\f[]
.fi
.PP
Open \f[C]http://akc.is/\f[] in the browser specified under the
\f[C][browser]\f[] section:
.IP
.nf
\f[C]
opn\ http://akc.is/
\f[]
.fi
.PP
For each file in the current directory display the manner in which it
would be opened:
.IP
.nf
\f[C]
opn\ \-\-dry\-run\ *
\f[]
.fi
.SH SEE ALSO
.PP
The source code to opn can be found at <https://github.com/akc/opn>.
See also the \f[C]README\f[] on that page.
.SH AUTHOR
.PP
Anders Claesson <http://akc.is>