From 0fb421969058ec07a09f7c927dddc1258de75631 Mon Sep 17 00:00:00 2001 From: tani <13175394+tttanikawa@users.noreply.github.com> Date: Sat, 26 Mar 2022 18:34:46 +0900 Subject: [PATCH] fix(fish): allow generating session keys in older versions of fish (#3697) * fix(linux): session key generation in fish * fix(fish): use string sub commands for the compatibility * fix(fish): add comment --- src/init/starship.fish | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/init/starship.fish b/src/init/starship.fish index f9df6bb8e..569968eba 100644 --- a/src/init/starship.fish +++ b/src/init/starship.fish @@ -37,4 +37,5 @@ builtin functions -e fish_mode_prompt set -gx STARSHIP_SHELL "fish" # Set up the session key that will be used to store logs -set -gx STARSHIP_SESSION_KEY (random 10000000000000 9999999999999999) +# We don't use `random [min] [max]` because it is unavailable in older versions of fish shell +set -gx STARSHIP_SESSION_KEY (string sub -s1 -l16 (random)(random)(random)(random)(random)0000000000000000)