mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-03-13 21:33:22 +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
plugins/eza
|
@ -20,9 +20,9 @@ All configurations are done using the `zstyle` command in the `:omz:plugins:eza`
|
|||
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`
|
||||
|
@ -31,9 +31,9 @@ Default: `0`
|
|||
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`
|
||||
|
|
|
@ -9,13 +9,11 @@ typeset -a _EZA_TAIL
|
|||
function _configure_eza() {
|
||||
local _val
|
||||
# Get the head flags
|
||||
zstyle -s ':omz:plugins:eza' 'showgroup' _val
|
||||
if [[ -z $_val || $_val == 1 ]]; then
|
||||
if zstyle -T ':omz:plugins:eza' 'showgroup'; then
|
||||
_EZA_HEAD+=("g")
|
||||
fi
|
||||
# Get the tail long-options
|
||||
zstyle -s ':omz:plugins:eza' 'dirs-first' _val
|
||||
if [[ $_val == 1 ]]; then
|
||||
if zstyle -t ':omz:plugins:eza' 'dirs-first'; then
|
||||
_EZA_TAIL+=("--group-directories-first")
|
||||
fi
|
||||
zstyle -s ':omz:plugins:eza' 'time-style' _val
|
||||
|
|
Loading…
Add table
Reference in a new issue