I'm installing liquidprompt and in the documentation they ask you to add [[ $- = *i* ]] && source ~/liquidprompt/liquidprompt
in your .bashrc
.
I am trying to understand the first part of the line but it's hard for a noob in bash like me. If anyone has a nice doc or the answer...
$-
contains the current shell options.
In [[ ... ]]
, the right hand side of a =
is interpreted as a pattern if not quoted. Therefore, *i*
means i
possibly preceded or followed by anything.
In other words, it checks wheter the i
option is present, i.e. whether the current shell is interactive.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With