You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.1 KiB

2 years ago
  1. if command -vq flatpak
  2. set -ga fish_user_paths ~/.local/share/flatpak/exports/bin /var/lib/flatpak/exports/bin
  3. set -gx --path XDG_DATA_DIRS /usr/local/share/ /usr/share/ ~/.local/share/flatpak/exports/share
  4. for install_dir in (flatpak --installations)
  5. set -gxa XDG_DATA_DIRS $install_dir/exports/share
  6. end
  7. end
  8. egrep "^export " ~/.bash_profile | while read e
  9. set var (echo $e | sed -E "s/^export ([A-Za-z_]+)=(.*)\$/\1/")
  10. set value (echo $e | sed -E "s/^export ([A-Za-z_]+)=(.*)\$/\2/")
  11. # remove surrounding quotes if existing
  12. set value (echo $value | sed -E "s/^\"(.*)\"\$/\1/")
  13. if test $var = "PATH"
  14. # replace ":" by spaces. this is how PATH looks for Fish
  15. set value (echo $value | sed -E "s/:/ /g")
  16. # use eval because we need to expand the value
  17. eval set -xg $var $value
  18. continue
  19. end
  20. # evaluate variables. we can use eval because we most likely just used "$var"
  21. set value (eval echo $value)
  22. #echo "set -xg '$var' '$value' (via '$e')"
  23. set -xg $var $value
  24. end
  25. if status --is-interactive
  26. neofetch
  27. end
  28. set -U fish_user_paths /usr/local/ubin ~/bin ~/go/bin ~/anaconda3/bin $fish_user_paths