mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
Use zstyle -T|-t to allow bool-ish values
This commit is contained in:
parent
ab33b5d274
commit
c7c7dd81ac
2 changed files with 6 additions and 8 deletions
|
|
@ -20,9 +20,9 @@ All configurations are done using the `zstyle` command in the `:omz:plugins:eza`
|
||||||
zstyle ':omz:plugins:eza' 'dirs-first' $BOOL
|
zstyle ':omz:plugins:eza' 'dirs-first' $BOOL
|
||||||
```
|
```
|
||||||
|
|
||||||
If `1`, directories will be grouped first.
|
If `true`, directories will be grouped first.
|
||||||
|
|
||||||
Default: `0`
|
Default: `false`
|
||||||
|
|
||||||
|
|
||||||
### `showgroup`
|
### `showgroup`
|
||||||
|
|
@ -31,9 +31,9 @@ Default: `0`
|
||||||
zstyle ':omz:plugins:eza' 'showgroup' $BOOL
|
zstyle ':omz:plugins:eza' 'showgroup' $BOOL
|
||||||
```
|
```
|
||||||
|
|
||||||
If `1` (default), always add `-g` flag to show the group ownership.
|
If `true` (default), always add `-g` flag to show the group ownership.
|
||||||
|
|
||||||
Default: `1`
|
Default: `true`
|
||||||
|
|
||||||
|
|
||||||
### `time-style`
|
### `time-style`
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,11 @@ typeset -a _EZA_TAIL
|
||||||
function _configure_eza() {
|
function _configure_eza() {
|
||||||
local _val
|
local _val
|
||||||
# Get the head flags
|
# Get the head flags
|
||||||
zstyle -s ':omz:plugins:eza' 'showgroup' _val
|
if zstyle -T ':omz:plugins:eza' 'showgroup'; then
|
||||||
if [[ -z $_val || $_val == 1 ]]; then
|
|
||||||
_EZA_HEAD+=("g")
|
_EZA_HEAD+=("g")
|
||||||
fi
|
fi
|
||||||
# Get the tail long-options
|
# Get the tail long-options
|
||||||
zstyle -s ':omz:plugins:eza' 'dirs-first' _val
|
if zstyle -t ':omz:plugins:eza' 'dirs-first'; then
|
||||||
if [[ $_val == 1 ]]; then
|
|
||||||
_EZA_TAIL+=("--group-directories-first")
|
_EZA_TAIL+=("--group-directories-first")
|
||||||
fi
|
fi
|
||||||
zstyle -s ':omz:plugins:eza' 'time-style' _val
|
zstyle -s ':omz:plugins:eza' 'time-style' _val
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue