- fd: A simple, fast and user-friendly alternative to ‘find’
- bandwhich: Terminal bandwidth utilization tool
- fileicon: macOS CLI for managing custom icons for files and folders
Tip of the week: How to batch install Homebrew packages for a quick bootstrap:
# On the existing system, dump all installed packages (taps, formulas, casks, and app store):
% brew bundle dump
# This creates a 'Brewfile' in the current directory:
% cat Brewfile
# Copy this file to a new system and run:
% brew bundle install
# To keep your system up-to-date using this method check out:
% brew bundle --help
# Pair this with `stow` to quickly install dotfiles and get a new system running in no time!
Continue reading
- lazydocker: The lazier way to manage everything docker
- fzf: A command-line fuzzy finder
- git-xargs: Make updates across multiple Github repositories with a single command
Tip of the week: How to make a loading animation:
frames="/ | \ -"
while :; do
for f in $frames; do printf "
%s Loading..." "$f"; sleep 0.5; done
done
Continue reading
- exa: A modern replacement for
ls
- buku: Personal mini-web in text
- treeage: Listing contents of repository in a tree-like format with age metric
Tip of the week: Move around directories quickly with various Zsh builtin methods:
# Return immediately to the previous directory:
% cd -
# With zsh, enable auto_cd [in ~/.zshrc] to move around without `cd`:
% setopt auto_cd
% .. # Go up a directory
% ../foo # Go up a directory and enter the 'foo' directory
% ../.. # Go up two directories
# Set a "bookmarked" directory once auto_cd is enabled:
% cdpath=(/path/to/important_directory)
% cd important_directory/subdirectory
# Keep a running list of directories visited:
% setopt auto_pushd
% cd /usr/local/bin; cd ~/.local/bin; cd ~/.config/gcloud
% echo $dirstack # See your directory stack
% cd -2 # Jump to element '2' in the stack (counting from the right, starting at zero)
% cd +1 # Jump to element '1' in the stack (counting from the left, starting at zero)
# Now the fun begins:
% setopt pushd_ignore_dups # Prevent duplicates in the stack
% cd "$(printf '%s
' "${dirstack[@]}" | fzf)"
Continue reading
- tablemark-cli: Generate markdown tables from JSON data
- gh-cli: GitHub’s official command line tool
- bandwhich: Terminal bandwidth utilization tool
Tip of the week: Quickly retrieve a deleted file from a Git repository:
% file="./repo/path/to/file"
git checkout $(git rev-list -n 1 HEAD -- "$file")~1 -- "$file"
Don’t know the full path of the file?
% filename="filename"
% sha="$(git log --all --full-history -1 --format=%H -- "**/$filename.*")" && \
git checkout "$sha"~1 -- "$(git diff-tree --no-commit-id --name-only -r "$sha" | grep "$filename")"
Continue reading
- git-sweep: Clean up Git branches that have been merged into master
- bat: A cat(1) clone with wings
- rdfind: find duplicate files utility
Tip of the week: You can avoid manually working with temp files by using ZSH process substitution:
Example:
% echo "Banana
Apple
Cucumber" > /path/to/file1
% sort /path/to/file1 > /path/to/file1 # Fails!
# Solution with a temp file:
% temp1=$(mktemp)
% sort /path/to/file1 > "$temp1"
% mv "$temp1" /path/to/file1
# Solution with process substitution:
% mv =(sort /path/to/file1) /path/to/file1
Continue reading