Welcome to Vifm Q&A, where you can ask questions about Vifm usage. Registration is optional, anonymous posts are moderated. GitHub or Google logins are enabled.

file command background process suppress errors

0 votes
asked Dec 12, 2016 in vifm by Nishant Varma

When I use the :file command (which is pretty nice) I can background the process using &. However the program's output is not suppressed which is really needed for most programs. Is there any way to suppress the same?

If I directly do :!command 2> /dev/null & everything works fine but I don't get the flexibility :file gives me i.e to chose my program of choice from the options listed.

1 Answer

+1 vote
answered Dec 12, 2016 by xaizek

You can use %i macro, which is effectively the same as redirection to /dev/null.

If those :file entries come from your vifmrc file, you can just add %i there. If they are from some .desktop-file, you can press c on an entry and then edit the command by appending %i.

However the program's output is not suppressed which is really needed for most programs.

It depends on programs you use. If they are terminal-based, ignoring their output by default can break them and there is no way for vifm to know if particular application is running in terminal or has a GUI. So showing errors by default seems to be the safest and universal choice.

commented Dec 16, 2016 by Nishant Varma

Thanks! Very helpful.

When asking, English language is preferred, but Russian, Ukrainian and maybe German can be used as well (in the last case answers might be in bad German).

If you would like to make a bug report or feature request consider using GitHub, SourceForge or e-mail. Posting such things here won't be considered as a spam, but this is not a perfect place for it.
...