A couple of days ago, I saw qfi on forums. Immediately, I knew I’d be using it for Portage files, but I had to hold up for a bit, because I wanted to install it in my home.

Basically, it’s does things like:

$ qfi --help
qfi 0.1.0
Usage: qfi [-d] TARGET
       qfi [-a|-m] TARGET FILENAME
       qfi -r TARGET NEWNAME
       qfi -l [TARGET]
$ qfi -a package.use /etc/portage/package.use
$ qfi package.use
Password:

It will automatically sudoedit if you are trying to edit a root-owned file. There were times, I forgot to sudo, just

$ vi /etc/portage/package.use

When I realized that I was opening the file in read-only mode and made quite some changes, you could imagine what came out of my mouth. With qfi it’s much easier and faster to edit those common files.

There is no database or any configuration file, the target and file is a simple symbolic link:

$ ls -l ~/.config/qfi/
total 0
[snip] make.conf -> /etc/make.conf
[snip] package.keywords -> /etc/portage/package.keywords
[snip] package.use -> /etc/portage/package.use
[snip] world -> /var/lib/portage/world

It also ships with Bash and Zsh completion.

You don’t have to use qfi for convenience, you can use a set of alias but if your Bash files are under version control, it seems that you would make some trivia commits, that’s not what I would like to have.