summary refs log tree commit diff stats
Commit message (Expand)AuthorAgeFilesLines
* core.metadata: added another TODO entryhut2015-01-171-0/+1
* Merge branch 'cd-select_file' of https://github.com/NoSuck/ranger into cd-sel...hut2015-01-171-1/+2
|\
| * Modified cd command to select original file, when following links.The Flying Rapist2015-01-131-1/+2
* | container.directory: don't crash get_selection if files is Nonehut2015-01-171-0/+2
* | core.metadata: add some TODO entrieshut2015-01-171-0/+3
* | Merge branch 'metadata'hut2015-01-1712-328/+272
|\ \
| * | core.metadata: delete keys if value is emptyhut2015-01-171-0/+5
| * | updated documentation of :paper/:meta commandshut2015-01-172-72/+57
| * | core.metadata: use DefaultOpenStruct instead of OpenStructhut2015-01-172-8/+8
| * | ext.openstruct: added DefaultOpenStructhut2015-01-171-0/+15
| * | core.metadata: use basenames by defaulthut2015-01-171-2/+4
| * | core.metadata: works well now, at first glancehut2015-01-173-111/+71
| * | core.metadata: added comments for self.meta{file,data}_cachehut2015-01-171-0/+2
| * | started porting core.metadata from csv to jsonhut2015-01-171-12/+24
| * | adapted commands for MetadataManagerhut2015-01-165-72/+42
| * | start turning ext.papermanager to core.metadatahut2015-01-137-45/+38
| |/
* / gui.ui: removed some finished TODO entrieshut2015-01-161-2/+0
|/
* ext.direction: fixed "move up=1 cycle=false"hut2015-01-041-1/+1
* Merge branch 'move-cycle' of https://github.com/PotatoesMaster/rangerhut2015-01-041-0/+5
|\
| * Add a 'cycle' option to directionEmanuel Guevel2014-12-151-0/+5
* | doc/ranger.1: added doc for "rename_append"hut2015-01-012-1/+12
* | config/rc.conf: make "a" binding use :rename_appendhut2015-01-011-1/+1
* | Merge branch 'rename_append' of https://github.com/NoSuck/rangerhut2015-01-011-6/+6
|\ \
| * | renameConsole -> rename_append; added special cases for hidden files and dire...The Flying Rapist2015-01-021-6/+6
|/ /
* | Merge branch 'master' of https://github.com/aureooms/rangerhut2014-12-282-15/+18
|\ \ | |/ |/|
| * add javascript file type to mime.types and rifle.confaureooms2014-12-192-15/+18
|/
* config/commands.py: fixed py3-specific encoding bughut2014-12-141-4/+1
* rebuilt man pagehut2014-12-111-3/+3
* Merge branch 'doc-typo' of https://github.com/mathstuf/rangerhut2014-12-111-1/+1
|\
| * doc: match the default configuration for untag mapBen Boeckel2014-12-111-1/+1
|/
* HACKING.md: better specification of python versionshut2014-12-111-1/+1
* update email addresshut2014-12-1159-60/+60
* Merge branch 'fix-hacking-references' of https://github.com/threeifbywhiskey/...hut2014-12-114-7/+7
|\
| * Fixed references to doc/HACKING (for real)Dorien Snake2014-12-104-4/+4
| * Fixed references to doc/HACKINGDorien Snake2014-12-104-7/+7
|/
* HACKING.md: clarificationshut2014-12-101-4/+4
* HACKING.md: typohut2014-12-101-1/+1
* HACKING.md: use markdown list in "Starting Points" subsectionhut2014-12-101-5/+7
* use markdown in HACKING.md, update it, fix typoshut2014-12-101-28/+46
* mv doc/HACKING ./HACKING.mdhut2014-12-101-0/+0
* config/commands.py: fix bulkrename on OSX 10.8, fixes #136hut2014-12-101-4/+6
* fix typo in previous commithut2014-12-101-1/+1
* container.directory: filtering optimizationshut2014-12-101-3/+6
* container.directory: more efficient filteringhut2014-12-101-7/+8
* container.directory: Fixed :scout -tf, fixes #195hut2014-12-101-0/+3
* api.commands: sort commands when tabbing in the console, fixes #171hut2014-12-101-1/+1
* config/commands.py: fix input delay, fixes #181hut2014-12-101-1/+1
* api.commands: Added attribute Command.quickly_executedhut2014-12-102-1/+8
* api.commands: pass attributes of AliasCommand to actual commandhut2014-12-101-2/+7
* core.fm: move a signal binding to a more sensible spothut2014-12-091-3/+4
ref='#n120'>120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
                                                               






































                                                                              

          





                                                                           
                                                                       


                                                                          


                                                          
  





                                    
  



                       
       
   
      
































































                                                                                           
                                                     








                                                                                                          
                                                                                 





























                                                                                                                                                                                                                                                                                                                                                                        


                                                                         





                                                                              


                                                                                





                                                                                            


                                                 

                     


                                                                                         




                                                                                     
                                                                                                                                                                                                 





                                                                                         






                                

                                                     




                                

                                                                        




                              

                                                               



                                     
.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is >0, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{\
.    if \nF \{\
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{\
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
.    \" fudge factors for nroff and troff
.if n \{\
.    ds #H 0
.    ds #V .8m
.    ds #F .3m
.    ds #[ \f1
.    ds #] \fP
.\}
.if t \{\
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.    ds #V .6m
.    ds #F 0
.    ds #[ \&
.    ds #] \&
.\}
.    \" simple accents for nroff and troff
.if n \{\
.    ds ' \&
.    ds ` \&
.    ds ^ \&
.    ds , \&
.    ds ~ ~
.    ds /
.\}
.if t \{\
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
.    \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.    \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.    \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.    ds : e
.    ds 8 ss
.    ds o a
.    ds d- d\h'-1'\(ga
.    ds D- D\h'-1'\(hy
.    ds th \o'bp'
.    ds Th \o'LP'
.    ds ae ae
.    ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "RIFLE 1"
.TH RIFLE 1 "rifle-1.9.2" "08/18/2019" "rifle manual"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
rifle \- ranger's file opener
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
\&\fBrifle\fR [\fB\-\-help\fR] [\fB\-f\fR \fI\s-1FLAGS\s0\fR] [\fB\-l\fR] [\fB\-p\fR \fI\s-1KEYWORD\s0\fR]
[\fB\-w\fR \fI\s-1PROGRAM\s0\fR] [\fB\-c\fR \fI\s-1CONFIG_FILE\s0\fR] \fIfiles\fR
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
rifle is a powerful file executor that allows for complex file type checking,
written to meet the needs of the file manager \fIranger\fR.  rifle's strength lies
in automatically determining file types, depending on which programs are
installed on the system, even without any user interaction.
.SH "OPTIONS"
.IX Header "OPTIONS"
.IP "\fB\-f\fR \fI\s-1FLAGS\s0\fR" 14
.IX Item "-f FLAGS"
Specify flags for opening the files.  Flags are letters that changes how the
program is executed.  Any combination of flags will work.  Writing uppercase
flags will negate the effect of all previously used lowercase flags of the same
letter.
.Sp
Table of all flags:
 f   fork program to background
 r   run program as root, using sudo
 t   run program in a separate terminal, as specified by \f(CW$TERMCMD\fR
.IP "\fB\-l\fR" 14
.IX Item "-l"
List all possible ways to open the specified files.  Each line will contain information in the format of \fIid:label:flags:command\fR. \fIid\fR is the identification number. \fIlabel\fR is an arbitrary string that was specified for this command, \fIflags\fR are the flags that are used by default, and \fIcommand\fR is the command that is going to be executed.
.IP "\fB\-p\fR \fI\s-1KEYWORD\s0\fR" 14
.IX Item "-p KEYWORD"
Pick a method to open the files.
.Sp
\&\fI\s-1KEYWORD\s0\fR is either the \s-1ID\s0 number listed by \f(CW\*(C`rifle \-l\*(C'\fR or a string that matches a label in the configuration file.
.IP "\fB\-w\fR \fI\s-1PROGRAM\s0\fR" 14
.IX Item "-w PROGRAM"
Open the files with the program \fI\s-1PROGRAM\s0\fR
.IP "\fB\-c\fR \fI\s-1CONFIG_FILE\s0\fR" 14
.IX Item "-c CONFIG_FILE"
Read configuration from \fI\s-1CONFIG_FILE\s0\fR, instead of the default.
.IP "\fB\-h\fR, \fB\-\-help\fR" 14
.IX Item "-h, --help"
Print a list of options and exit.
.SH "FILES"
.IX Header "FILES"
rifle shares configuration files with ranger, though ranger is not required in
order to use rifle. The default configuration file \fIrifle.conf\fR is expected
to be at \fI~/.config/ranger/rifle.conf\fR. However, this can be overridden with
the \fB\-c\fR option.
.PP
This file specifies patterns for determining the commands to open files with.
The syntax is described in the comments of the default \fIrifle.conf\fR that ships
with ranger.  To obtain it, you need to run: \f(CW\*(C`ranger \-\-copy\-config=rifle\*(C'\fR
.SH "ENVIRONMENT"
.IX Header "ENVIRONMENT"
.IP "\s-1VISUAL\s0" 8
.IX Item "VISUAL"
Determines which editor to use for editing files.
.IP "\s-1EDITOR\s0" 8
.IX Item "EDITOR"
Determines which editor to use for editing files if \s-1VISUAL\s0 is undefined or
empty (in the default \fIrifle.conf\fR). If both are undefined or empty, \*(L"vim\*(R" is
used instead.
.IP "\s-1PAGER\s0" 8
.IX Item "PAGER"
Determines which pager to use for displaying files (in the default \fIrifle.conf\fR).
.IP "\s-1TERMCMD\s0" 8
.IX Item "TERMCMD"
Determines the terminal emulator command for use with the \fIt\fR flag.  It is required that the value is the path to an executable file which accepts the \*(L"\-e \s-1COMMAND\*(R"\s0 argument.
.IP "\s-1XDG_CONFIG_HOME\s0" 8
.IX Item "XDG_CONFIG_HOME"
Specifies the directory for configuration files. Defaults to \fI\f(CI$HOME\fI/.config\fR.
.SH "EXAMPLES"
.IX Header "EXAMPLES"
List all the different methods:
.PP
.Vb 4
\& $ rifle \-l helloworld.py
\& 0:editor::"$EDITOR" \-\- "$@"
\& 1:pager::"$PAGER" \-\- "$@"
\& 2:::python \-\- "$1"
.Ve
.PP
Display its content by opening it with \*(L"cat\*(R":
.PP
.Vb 2
\& $ rifle \-w cat helloworld.py
\& print("Hello World!")
.Ve
.PP
Run it by picking the method 2, which calls 'python \*(-- \*(L"$1\*(R"':
.PP
.Vb 2
\& $ rifle \-p 2 helloworld.py
\& Hello World!
.Ve
.PP
Display the file in a pager inside a new terminal, run as root:
.PP
.Vb 1
\& $ rifle \-p 1 \-f tr helloworld.py
.Ve