Ranger - open_with without suspending
Try open_with
with the f
or t
flag:
open_with [application] [flags] [mode]
Open the selected files with the given application, unless it is omitted, in which case the default application is used. flags change the way the application is executed and are described in their own section in this man page. The mode is a number that specifies which application to use. The list of applications is generated by the external file opener "rifle" and can be displayed when pressing "r" in ranger.
Note that if you specify an application, the mode is ignored.
Flags give you a way to modify the behavior of the spawned process. They are used in the commands :open_with (key "r") and :shell (key "!").
f Fork the process. (Run in background) c Run the current file only, instead of the selection r Run application with root privilege (requires sudo) t Run application in a new terminal window
Related videos on Youtube
tigerjack
Updated on September 18, 2022Comments
-
tigerjack almost 2 years
When I open a file into ranger with a GUI application not listed in the
rifle.conf
file (i.e. using theopen_with
command), the ranger terminal window gets "suspended" until I close the GUI app.For this reason, I'd like to have a way to open files with a specific application, but still get the ability to navigate the files in the ranger terminal.
This is the default behaviour when you open the same file with one of the application listed in the
rifle.conf
file.Is there any way to achieve the goal?
-
tigerjack about 7 yearsYou made my day :D
-
Inspired_Blue over 6 yearsHow to make this the default behavior for ranger? That is when I try to open a file by pressing
RIGHT
, it should open it with thef
flag. -
AdminBee almost 4 yearsWelcome to the site, and thank you for your contribution. Please note that if you have identified possible duplicates among questions, the best way is to flag a post for moderator attention, rather than "copying" answers between questions.
-
Kusalananda almost 3 yearsSo does the
f
flag. See the accepted answer.