ogham / exa

A modern replacement for ‘ls’.
https://the.exa.website/
MIT License
23.54k stars 664 forks source link

[Fr] Option to store arguments in environment and/or dot file #1116

Closed andrewcrook closed 1 year ago

andrewcrook commented 2 years ago

My alias and command lines for exa become quite long. I wonder if it could be possible to add arguments into an environment variable.

example >> EXA_OPTS=“--header --long --grid"

Another option would be to use a dot file

example ~/.config/exa/config.yml

header: yes
details: long
mode: grid   # tree, grid etc
classify: no
icons: yes
eggbean commented 2 years ago

You could make a wrapper script like the one I made, or modify it, to do what you want. https://gist.github.com/eggbean/74db77c4f6404dd1f975bd6f048b86f8

andrewcrook commented 2 years ago

You could make a wrapper script like the one I made, or modify it, to do what you want. https://gist.github.com/eggbean/74db77c4f6404dd1f975bd6f048b86f8

@eggbean Thanks I will take a look. I wonder if I could add a column for permissions in Octal format without too much of a performance hit.

eggbean commented 2 years ago

I doubt it would add any noticeable time, but I imagine coding it would take a bit of time unless you already know of a way to do it. I'm imagining printf and column command being two things to look into.

jnordwick commented 1 year ago

what prevents you from alisasing exa='exa $EXA_OPTS'`? i have function l that ia my base ls/exa call and define my ll/la/lla/... aliases in terms of that (i added some small code to turn offs some options with +opt syntax).