CLI Tools

  1. fzf-tab: Replace zsh’s default completion selection menu with fzf
  2. bashate: Code style enforcement for bash programs

Tip of the Week

How to make dig a little easier to use:

The default output of dig includes the program version, technical information about the results, the query, the actual result, and statistics. Note: dig uses + instead of - for option flags.

# remove the version, technical info, query, and statistics sections:
% dig stackoverflow.com +nocmd +nocomment +noquestion +nostats
stackoverflow.com.      377     IN      A       151.101.193.69
stackoverflow.com.      377     IN      A       151.101.1.69
stackoverflow.com.      377     IN      A       151.101.65.69
stackoverflow.com.      377     IN      A       151.101.129.69

# the above can be re-written as:
% dig stackoverflow.com +noall +answer

# reduce the 'answer' portion even more:
% dig stackoverflow.com +short
151.101.193.69
151.101.1.69
151.101.65.69
151.101.129.69

# instead of an A record search, show other record types:
% dig NS stackoverflow.com +short
ns-cloud-e2.googledomains.com.
ns-cloud-e1.googledomains.com.
ns-1033.awsdns-01.org.
ns-358.awsdns-44.com.

% dig MX stackoverflow.com +short
1 aspmx.l.google.com.
10 alt3.aspmx.l.google.com.
10 alt4.aspmx.l.google.com.
5 alt2.aspmx.l.google.com.
5 alt1.aspmx.l.google.com.

# use a different DNS server (can help against caching):
% dig stackoverflow.com @9.9.9.9  # https://www.quad9.net

# do a reverse lookup:
% dig -x 185.199.111.153 +short
cdn-185-199-111-153.github.com.

# dig supports a config file, for example:
cat << EOF > ~/.digrc
+noall
+answer
EOF