From deb06a85b905362bb638beaf13b74b9355cca11a Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Sun, 5 Jun 2022 18:16:00 -0500 Subject: [PATCH] Add List All The Enabled ZSH Options as a Unix TIL --- README.md | 3 ++- unix/list-all-the-enabled-zsh-options.md | 25 ++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 unix/list-all-the-enabled-zsh-options.md diff --git a/README.md b/README.md index e97b60d..bf87e18 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ pairing with smart people at Hashrocket. For a steady stream of TILs, [sign up for my newsletter](https://crafty-builder-6996.ck.page/e169c61186). -_1219 TILs and counting..._ +_1220 TILs and counting..._ --- @@ -1186,6 +1186,7 @@ _1219 TILs and counting..._ - [Killing A Frozen SSH Session](unix/killing-a-frozen-ssh-session.md) - [Last Argument Of The Last Command](unix/last-argument-of-the-last-command.md) - [Less With Style](unix/less-with-style.md) +- [List All The Enabled ZSH Options](unix/list-all-the-enabled-zsh-options.md) - [List All Users](unix/list-all-users.md) - [List Files Ordered By Modification Date](unix/list-files-ordered-by-modification-date.md) - [List Names Of Files With Matches](unix/list-names-of-files-with-matches.md) diff --git a/unix/list-all-the-enabled-zsh-options.md b/unix/list-all-the-enabled-zsh-options.md new file mode 100644 index 0000000..5a5085f --- /dev/null +++ b/unix/list-all-the-enabled-zsh-options.md @@ -0,0 +1,25 @@ +# List All The Enabled ZSH Options + +The zsh shell has a [ton of +options](https://zsh.sourceforge.io/Doc/Release/Options.html) that can be +enabled and disabled for all kinds of functionality. Some of these options are +enabled by default, some of them may be enabled by a script like +[oh-my-zsh](https://ohmyz.sh/), and even more might have been enabled or +disabled by you in your `~/.zshrc` file. + +To quickly produce a list of all options that are currently enabled, run: + +```bash +$ setopt +``` + +All enabled options will be output by that command. That might be a lot of +output, so if you know what you are looking for, you can `grep` through the +output. Or, even better, if you have [`fzf`](https://github.com/junegunn/fzf) +installed, you can interactively fuzzy search through it. + +```bash +$ setopt | fzf +``` + +[source](https://unix.stackexchange.com/questions/121802/zsh-how-to-check-if-an-option-is-enabled/121810#121810)