Skip to content
Commit 9daa1838 authored by Bouke van der Bijl's avatar Bouke van der Bijl
Browse files

fish: replace use of tr with string split

This shaves about 4ms off fish start time.

Before (profiled with 'fish --profile prof.txt -c fish_prompt'):

225	4636	----> set -l __nix_profile_paths (echo $NIX_PROFILES | /nix/store/m5ajgnzp2512na31brwfmydwk3l1gawb-coreutils-8.31/bin/tr ' ' '\n')[-1..1]
4411	4411	-----> echo $NIX_PROFILES | /nix/store/m5ajgnzp2512na31brwfmydwk3l1gawb-coreutils-8.31/bin/tr ' ' '\n'

After:

190	248	----> set -l __nix_profile_paths (string split ' ' $NIX_PROFILES)[-1..1]
parent 9d0c3ffe
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment