On Fri, Aug 18, 2017 at 5:53 PM, Mark Volkmann <r.mark.volkm...@gmail.com>
wrote:
> I was so close!
> I had this:
> set -q language; or set language 'english'
>
> Why do I need the [1] part?
>
Because fish vars can be set but have no value. Every fish var is an array
which can have zero, one, or more values. `set -q var[1]` is the idiomatic
way to test that the var is not only set but also has at least one value.
--
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users