[Question]: Parsing for git support #111
-
What's the recommended way to test (in a shell) for git support. > eza --version
eza - A modern, maintained replacement for ls
v0.10.4 [+git]
https://github.com/cafkafk/eza
> eza --version | head -n2 | tail -n1 | grep -qF '[+git]'
> eza --version | grep -qF '[+git]' Can you be guaranteed the features will always be on the second line? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Some context: I'd like to use this to set up my alias to call
|
Beta Was this translation helpful? Give feedback.
-
I cannot promise this will never change, but this may work for your use case: eza --version | grep '\[+git\]' -o && eza -l --git || eza -l Can you see if this works for you? |
Beta Was this translation helpful? Give feedback.
-
Of course, you should be able to add any options you like to either of those |
Beta Was this translation helpful? Give feedback.
I cannot promise this will never change, but this may work for your use case:
Can you see if this works for you?