Skip to content

Commit

Permalink
Allow eza_params to be overwritten (#31)
Browse files Browse the repository at this point in the history
* Allow eza_params to be overwritten

* Self review
  • Loading branch information
robinknaapen authored Jul 12, 2024
1 parent 4127f43 commit b0b0b02
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 5 additions & 8 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,12 @@
<tr><td><img align="center" style="width:100%;height:auto" src="https://user-images.githubusercontent.com/59910950/165784269-3a8a8bfe-f291-4a33-aac9-1afa2b7b767f.png" />
</td></tr></table></div>

## Default settings
### Environment variables

Sets paramters and aliases for `eza` to replace `ls`, enable auto list directories on `cd` with `export AUTOCD=1`.

### Parameters

```shell
eza_params=('--git' '--icons' '--classify' '--group-directories-first' '--time-style=long-iso' '--group' '--color-scale')
```
| Variable | Description | Default |
| ------------- | -------------- | -------------- |
| _EZA_PARAMS | eza params to be used | `('--git' '--group' '--group-directories-first' '--time-style=long-iso' '--color-scale=all' '--icons')` |
| AUTOCD | enable auto list directories on `cd` | 0 |

### Aliases

Expand Down
2 changes: 2 additions & 0 deletions functions/.zsh-eza
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ if (( $+commands[eza] )); then
'--time-style=long-iso' '--color-scale=all'
)

[[ ! -z $_EZA_PARAMS ]] && eza_params=($_EZA_PARAMS)

alias ls='eza $eza_params'
alias l='eza --git-ignore $eza_params'
alias ll='eza --all --header --long $eza_params'
Expand Down

0 comments on commit b0b0b02

Please sign in to comment.