Shell Tips
70 curated tips — shortcuts, workflows, and hidden features from Nirmal's Shell, including when conditional tools and integrations show up.
70
tip records
29
conditional tips
9
tip sources
Use .. / ... / .... to go up 1/2/3 levels quickly
Always available
Use - to go back to your previous directory
Always available
Use pushd/popd and dirs -v for directory stack navigation
Always available
Use cd ~1 after dirs -v to jump back through your directory stack
Always available
Run ll for a long listing with hidden files and readable sizes
Always available
Run lt for a tree view up to 3 levels deep
Available when the lt alias is available
Run glog for a visual git graph of the last 20 commits
Always available
Run gpr to pull with rebase for a cleaner history
Always available
Run gun to undo your last commit while keeping changes staged
Always available
Run croot to jump to the root of the current git repo
Always available
Run fbr to fuzzy-pick and checkout a git branch from local or remote refs
Always available
Use gs, gd, ga, gaa, gco, gb for quick git operations when the OMZ git plugin is enabled
Available when the OMZ git plugin aliases are loaded
Run extract <archive> to unpack a supported archive
Always available
Run mkcd <dir> to create a directory and cd into it in one step
Always available
Run dusage [path] [count] to summarize any directory with a custom limit
Always available
Run bigfiles [path] [count] to inspect any tree with a custom limit
Always available
Run fkill to fuzzy select and kill a process
Always available
Run fkill 15 to send SIGTERM and select multiple processes
Always available
Run ports to see all listening ports and their processes
Always available
Run myip to check your public IP address over HTTPS
Always available
Run weather to get a quick forecast over HTTPS
Always available
Run peek <file> to preview a file quickly
Always available
Run headers <url> to follow redirects and print response headers
Always available
Use global alias G anywhere: git log G fix pipes to grep
Always available
Use global alias L anywhere: cat file.txt L pipes to less
Always available
Use global alias W anywhere: ps aux W counts lines
Always available
Use global alias NE anywhere: command NE suppresses errors
Always available
Use global alias NUL anywhere: noisy-command NUL silences stdout and stderr
Always available
Combine globals: git log G fix W counts commits mentioning fix
Always available
Use **/*.ext for recursive glob matching (EXTENDED_GLOB)
Always available
* includes dotfiles because GLOB_DOTS is enabled
Always available
Use *(.m-1) to glob files modified in the last day
Always available
file2 sorts before file10 because NUMERIC_GLOB_SORT is enabled
Always available
History is shared across all open terminal sessions
Always available
Ctrl+R history search skips duplicate commands
Always available
Commands starting with a space are omitted from history (HIST_IGNORE_SPACE)
Always available
Command spell-correction prompts are intentionally disabled
Always available
Tab completion is case-insensitive for names and paths
Always available
Use z <pattern> to jump to directories zoxide remembers
Available when zoxide is installed
Use zi for an interactive zoxide directory picker
Available when zoxide is installed
Press Ctrl+R to fuzzy search your command history
Available when fzf is installed in an interactive shell
Press Ctrl+T to fuzzy insert a file path at your cursor
Available when fzf is installed in an interactive shell
Press Alt+C to fuzzy cd into a directory
Available when fzf is installed in an interactive shell
Run npkg add bat for a short nix profile add command
Available when nix is installed
Run npkg search ripgrep to search nixpkgs with package descriptions
Available when nix is installed
Run npkg refresh to rebuild the cached nixpkgs picker index (requires jq)
Available when nix and jq are installed
Run npkg outdated to preview available package upgrades before running npkg upgrade
Available when nix and jq are installed
Run npkg install with no args to fuzzy-pick nixpkgs attribute names
Available when nix, jq, and fzf are installed
Run npkg find nvim to seed the nix package picker with an initial query
Available when nix, jq, and fzf are installed
npkg find shows description, version, and homepage in the preview pane
Available when nix, jq, and fzf are installed
Run npkg remove with no args to fuzzy-select installed Nix packages to uninstall
Available when nix, jq, and fzf are installed
Run fanprofile to see the current laptop performance/fan profile
Always available
Run upkg managers to see active backends and alternates like pacman via --only
Available when at least one supported package manager is installed
Run upkg managers --only=npm,flatpak to confirm selected execution order before upgrading
Available when at least one supported package manager is installed
On Arch-family systems, upkg treats empty repo and AUR outdated checks as up to date instead of surfacing a false failure
Available when at least one supported package manager is installed
Run upkg plan or upkg --dry-run to preview upgrades without changing packages
Available when at least one supported package manager is installed
Run upkg upgrade --sudo to opt into system package upgrades explicitly
Available when at least one supported package manager is installed
Run gitcount to see contributor counts for the current repo; gcount still works as a shortcut
Always available
npkg pickers move the preview below the list on narrow terminals so names stay readable
Available when nix, jq, and fzf are installed
Run upkg search ripgrep to compare matches from detected managers in one compact table
Available when at least one supported package manager is installed
In rich terminals, upkg search shows which manager it is querying before the final table appears
Available when at least one supported package manager is installed
Run upkg search ripgrep viewer to pass multi-word searches through to package manager backends
Available when at least one supported package manager is installed
Use upkg search ripgrep --only=brew to search Homebrew formulae and casks without touching other package managers
Available when at least one supported package manager is installed
When upkg search has backend failures, the summary names the failing manager IDs so you can rerun with --only quickly
Available when at least one supported package manager is installed
Pipe upkg managers when you want plain active-manager IDs without extra status tags
Available when at least one supported package manager is installed
Use ff <pattern> [path] to find files by name; it falls back from fd/fdfind to find
Always available
Use ft <pattern> [path] to search text; it falls back from ripgrep to grep
Always available
Run path to inspect each PATH entry with rich output in capable terminals
Always available
Run upkg to list outdated packages across detected package managers
Available when at least one supported package manager is installed
Use upkg --only=flatpak,npm to limit checks to selected managers
Available when at least one supported package manager is installed