1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-12-29 04:23:26 +00:00

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
This commit is contained in:
tani 2022-03-26 18:34:46 +09:00 committed by GitHub
parent e04f126a10
commit 0fb4219690
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)