Not for normies
| 1 | # ANSI formatting function (\033[<code>m) |
| 2 | # 0: reset, 1: bold, 4: underline, 22: no bold, 24: no underline, 31: red, 33: yellow |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | # If stdout is not a terminal ignore all formatting |
| 8 | [ || |
| 9 | |
| 10 | # Protect against non-zsh execution of Oh My Zsh (use POSIX syntax here) |
| 11 | [ || { |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | { |
| 30 | shell= |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | } |
| 37 | |
| 38 | |
| 39 | } |
| 40 | |
| 41 | # Check if in emulation mode, if so early return |
| 42 | # https://github.com/ohmyzsh/ohmyzsh/issues/11686 |
| 43 | || { |
| 44 | |
| 45 | |
| 46 | } |
| 47 | |
| 48 | |
| 49 | |
| 50 | # If ZSH is not defined, use the current script's directory. |
| 51 | || |
| 52 | |
| 53 | # Set ZSH_CUSTOM to the path where your custom config files |
| 54 | # and plugins exists, or else we will use the default custom/ |
| 55 | || ZSH_CUSTOM="/custom" |
| 56 | |
| 57 | # Set ZSH_CACHE_DIR to the path where cache files should be created |
| 58 | # or else we will use the default cache/ |
| 59 | || ZSH_CACHE_DIR="/cache" |
| 60 | |
| 61 | # Make sure $ZSH_CACHE_DIR is writable, otherwise use a directory in $HOME |
| 62 | if ; then |
| 63 | ZSH_CACHE_DIR="/oh-my-zsh" |
| 64 | fi |
| 65 | |
| 66 | # Create cache and completions dir and add to $fpath |
| 67 | |
| 68 | || fpath=("/completions" ) |
| 69 | |
| 70 | # Check for updates on initial load... |
| 71 | |
| 72 | |
| 73 | # Initializes Oh My Zsh |
| 74 | |
| 75 | # add a function path |
| 76 | fpath=(/ / ) |
| 77 | |
| 78 | # Load all stock functions (from $fpath files) called below. |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
| 85 | |
| 86 | |
| 87 | |
| 88 | # Add all defined plugins to fpath. This must be done |
| 89 | # before running compinit. |
| 90 | for; do |
| 91 | if ; then |
| 92 | fpath=("/plugins/" ) |
| 93 | elif ; then |
| 94 | fpath=("/plugins/" ) |
| 95 | else |
| 96 | |
| 97 | fi |
| 98 | done |
| 99 | |
| 100 | # Figure out the SHORT hostname |
| 101 | if ; then |
| 102 | # macOS's $HOST changes with dhcp, etc. Use ComputerName if possible. |
| 103 | SHORT_HOST= || SHORT_HOST="" |
| 104 | else |
| 105 | SHORT_HOST="" |
| 106 | fi |
| 107 | |
| 108 | # Save the location of the current completion dump file. |
| 109 | if ; then |
| 110 | ZSH_COMPDUMP="/.zcompdump--" |
| 111 | fi |
| 112 | |
| 113 | # Construct zcompdump OMZ metadata |
| 114 | zcompdump_revision="#omz revision: " |
| 115 | zcompdump_fpath="#omz fpath: " |
| 116 | |
| 117 | # Delete the zcompdump file if OMZ zcompdump metadata changed |
| 118 | if ! |
| 119 | || ; then |
| 120 | |
| 121 | zcompdump_refresh=1 |
| 122 | fi |
| 123 | |
| 124 | if ; then |
| 125 | |
| 126 | # Load only from secure directories |
| 127 | |
| 128 | # If completion insecurities exist, warn the user |
| 129 | &| |
| 130 | else |
| 131 | # If the user wants it, load from all found directories |
| 132 | |
| 133 | fi |
| 134 | |
| 135 | # Append zcompdump metadata if missing |
| 136 | if \ |
| 137 | || ; then |
| 138 | # Use `tee` in case the $ZSH_COMPDUMP filename is invalid, to silence the error |
| 139 | # See https://github.com/ohmyzsh/ohmyzsh/commit/dd1a7269#commitcomment-39003489 |
| 140 | |
| 141 | |
| 142 | |
| 143 | |
| 144 | |
| 145 | fi |
| 146 | |
| 147 | |
| 148 | # zcompile the completion dump file if the .zwc is older or missing. |
| 149 | if ; then |
| 150 | |
| 151 | |
| 152 | fi |
| 153 | |
| 154 | |
| 155 | |
| 156 | |
| 157 | |
| 158 | |
| 159 | |
| 160 | |
| 161 | |
| 162 | |
| 163 | |
| 164 | |
| 165 | |
| 166 | |
| 167 | |
| 168 | |
| 169 | |
| 170 | |
| 171 | |
| 172 | |
| 173 | |
| 174 | |
| 175 | |
| 176 | |
| 177 | |
| 178 | |
| 179 | |
| 180 | |
| 181 | |
| 182 | |
| 183 | |
| 184 | |
| 185 | |
| 186 | |
| 187 | |
| 188 | |
| 189 | |
| 190 | |
| 191 | |
| 192 | |
| 193 | |
| 194 | |
| 195 | |
| 196 | |
| 197 | |
| 198 | |
| 199 | |
| 200 | |
| 201 | |
| 202 | |
| 203 | |
| 204 | |
| 205 | |
| 206 | |
| 207 | |
| 208 | |
| 209 | |
| 210 | |
| 211 | |
| 212 | |
| 213 | |
| 214 | |
| 215 | |
| 216 | |
| 217 | |
| 218 | |
| 219 | |
| 220 | |
| 221 | |
| 222 | |
| 223 | |
| 224 | |
| 225 | |
| 226 | |
| 227 | |
| 228 | |
| 229 | |
| 230 | |
| 231 | |
| 232 | |
| 233 | |
| 234 |