Linux

Zsh & Oh My Zsh

37 flashcards · answers and spaced-repetition review in the KnowCard app

Bash is standard on most distributions, so why do zsh advocates prefer it for daily interactive work?
macOS ships zsh as its default shell instead of bash. What is the actual driver behind Apple's choice?
Someone plans to rewrite their bash scripts in zsh because they switched their interactive shell to zsh. What is the caution?
You're on an unfamiliar Linux box and need to know which shell is currently active. What is the quickest check?
After installing the zsh package, what command permanently makes zsh your login shell, and where does that change actually get written?
You try to run chsh to change your shell and the command isn't found. Which package supplies it, and does the answer depend on the distro?
After switching to zsh your bash aliases stop working. Which two zsh config files matter most, and what does each hold?
You start zsh for the very first time with no config files present and land in an interactive setup. What do its two main options actually do?
Which zsh component drives its Tab completion, and how do you reconfigure it later without rerunning the new-user installer?
In the zsh Options menu, what does turning on autocd change about how you move between directories?
Enabling extendedglob gives three characters special globbing meaning. Which characters, and what is the cost of turning it on?
You want to try a zsh option temporarily. Which command turns it on, which turns it off, and why does capitalization not matter?
Beyond the new-user installer defaults, which three setopt lines are commonly added to a .zshrc for better ergonomics?
With correction enabled you type mdkir and zsh prompts correct 'mdkir' to 'mkdir' [nyae]? What do the four letters mean?
In bash you must know a filename's opening letters to Tab-complete it. How is zsh completion smarter than that?
You're about to run rm *.pdf and want to see exactly which files the pattern will hit first. What can zsh do that bash cannot?
zsh lets you append a qualifier in parentheses to a glob to filter by file property. What do the common qualifiers select?
How do you list only plain files, or only directories, or files changed in the last week, using zsh qualifiers — and how do you make it recursive?
You need to give directories 750 and files 640 across a whole tree. Why is zsh globbing a cleaner tool than find for this?
Beyond the basic star, what do alternatives, negation, and fuzzy matching look like in zsh globbing — and which need extendedglob?
With extendedglob on, how do you list all markdown files except one specific file, and how do you exclude a numbered set?
What problem does Oh My Zsh solve, and what side effect does its installer have on your existing config?
Right after installing Oh My Zsh with default settings, what theme and plugin are active, and what does that give you?
You add a second Oh My Zsh plugin by writing plugins=(git,dirhistory) and it breaks. What is wrong?
You edit ZSH_THEME and the plugins list in .zshrc but nothing changes in your current terminal. Why, and what does dirhistory add?
You want the Powerlevel10k prompt but it isn't in your plugins/themes list. What extra steps does it require, and why might symbols show as boxes?
Which three zsh extensions add color to your shell experience, and what does each one actually colorize?
The colorize plugin gives you ccat and cless. Why is aliasing less=cless a bad idea?
You want the shell to flag a mistyped command before you hit Enter. Which zsh plugin does this, why isn't it in a standard Oh My Zsh setup, and how is it installed?
You boot a fresh Manjaro or Kali install and the shell already looks and behaves unlike bash. Why, and how do you get plain bash back?
bash mostly reads .bashrc, but zsh spreads its startup across several files. What are they, and in what order are the global versus local versions read?
Which zsh startup files run depends on whether you have a login shell or an interactive shell. What actually distinguishes the two?
In the Keys step of zsh-newuser-install, which keyboard editing style is applied to the command line by default, and what is the alternative?
By default a glob that matches nothing is often passed through unchanged. What does turning on the zsh nomatch option do instead?
Beyond selecting by file type, zsh glob qualifiers can filter by permission bits and by size. What do the permission, setuid/setgid, and size qualifiers select?
You typed a filename slightly wrong and the glob no longer matches. How does zsh's approximate matching let a pattern tolerate a few typos?
Tab in zsh expands glob patterns into filenames on the command line. What else does the same Tab press expand?

Start learning today

Free to start — download the app or use it in your browser.

Get it on App StoreGet it on Google Play
Zsh & Oh My Zsh (Linux) · KnowCard