about summary refs log tree commit diff
path: root/pkgs/shells/fish
diff options
context:
space:
mode:
authorMichele Guerini Rocco <rnhmjoj@users.noreply.github.com>2020-06-18 09:48:01 +0200
committerGitHub <noreply@github.com>2020-06-18 09:48:01 +0200
commitb2532174e084562215036cd828c06cc83dbd806e (patch)
treeb0f8fd1db1bf7ddfe0e14f073ca5308c19c9e137 /pkgs/shells/fish
parent9480bae337095fd24f61380bce3174fdfe926a00 (diff)
parent84e25cf478d8f81070659a30f5181b0e11a028ff (diff)
downloadnixlib-b2532174e084562215036cd828c06cc83dbd806e.tar
nixlib-b2532174e084562215036cd828c06cc83dbd806e.tar.gz
nixlib-b2532174e084562215036cd828c06cc83dbd806e.tar.bz2
nixlib-b2532174e084562215036cd828c06cc83dbd806e.tar.lz
nixlib-b2532174e084562215036cd828c06cc83dbd806e.tar.xz
nixlib-b2532174e084562215036cd828c06cc83dbd806e.tar.zst
nixlib-b2532174e084562215036cd828c06cc83dbd806e.zip
Merge pull request #90670 from bouk/fish-no-tr
fish: replace use of tr with string split
Diffstat (limited to 'pkgs/shells/fish')
-rw-r--r--pkgs/shells/fish/default.nix17
1 files changed, 7 insertions, 10 deletions
diff --git a/pkgs/shells/fish/default.nix b/pkgs/shells/fish/default.nix
index 420aac7607e4..7cd31f14abdb 100644
--- a/pkgs/shells/fish/default.nix
+++ b/pkgs/shells/fish/default.nix
@@ -79,20 +79,17 @@ let
 
       # additional profiles are expected in order of precedence, which means the reverse of the
       # NIX_PROFILES variable (same as config.environment.profiles)
-      set -l __nix_profile_paths (echo $NIX_PROFILES | ${coreutils}/bin/tr ' ' '\n')[-1..1]
+      set -l __nix_profile_paths (string split ' ' $NIX_PROFILES)[-1..1]
 
-      set __extra_completionsdir \
+      set -p __extra_completionsdir \
         $__nix_profile_paths"/etc/fish/completions" \
-        $__nix_profile_paths"/share/fish/vendor_completions.d" \
-        $__extra_completionsdir
-      set __extra_functionsdir \
+        $__nix_profile_paths"/share/fish/vendor_completions.d"
+      set -p __extra_functionsdir \
         $__nix_profile_paths"/etc/fish/functions" \
-        $__nix_profile_paths"/share/fish/vendor_functions.d" \
-        $__extra_functionsdir
-      set __extra_confdir \
+        $__nix_profile_paths"/share/fish/vendor_functions.d"
+      set -p __extra_confdir \
         $__nix_profile_paths"/etc/fish/conf.d" \
-        $__nix_profile_paths"/share/fish/vendor_conf.d" \
-        $__extra_confdir
+        $__nix_profile_paths"/share/fish/vendor_conf.d"
     end
   '';