#!/bin/fish if status --is-login set -lx IFS = env -i /bin/sh -c '. /etc/profile.env; /bin/env -0' | while read -z K V set -gx $K $V end if [ "$EUID" = "0" ]; or [ "$USER" = "root" ] set -gx PATH /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin (string replace -a -- : \n $ROOTPATH) else set -gx PATH /usr/local/bin /usr/bin /bin (string replace -a -- : \n $PATH) end set -e ROOTPATH end