mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 07:08:01 +00:00
Add List All The Enabled ZSH Options as a Unix TIL
This commit is contained in:
@@ -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)
|
||||
|
||||
25
unix/list-all-the-enabled-zsh-options.md
Normal file
25
unix/list-all-the-enabled-zsh-options.md
Normal file
@@ -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)
|
||||
Reference in New Issue
Block a user