firejail Command Completions for zsh

Command completions are awesome when they work. A great example is the docker command completion. It helps a lot: if you don’t know the possible commands or options, it shows them to you. If you do know them, you only have to type few letters and hit <TAB>. The best is when shows options which it dynamically generates, e.g. when you want to inspect an image, “docker image inspect <TAB><TAB>” will show you the images you can inspect. A real time saver.

Using firejail made me want to have command completion for it too as it has a ton of command line options. And some of them can have dynamic updates. There’s a completion script for bash part of the firejail repo, but no zsh.

So I created one. Was an interesting experience. And definitely helps me using firejail.

Most helpful was this blog post which is one of the very few simple zsh completion examples I found.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create your website with
Get started
%d bloggers like this: