Skip to content

Commit

Permalink
Borrow add_path function from the Internet and use it for local bin
Browse files Browse the repository at this point in the history
This is how you might install utilities using cargo or pip, for example.
  • Loading branch information
glasserc committed Mar 5, 2022
1 parent 6d7fd1a commit da5ce6c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dot/config/fish/config.fish
Expand Up @@ -2,6 +2,16 @@
set -g __fish_git_prompt_show_informative_status true
set -g __fish_git_prompt_showcolorhints true

# Take this out in fish 3.2.0
function add_path --description "Utility to add stuff to fish_user_paths idempotently."
set -l path $argv[1]
if [ -e $path ]
contains $path $fish_user_paths; or set -Ua fish_user_paths $path
end
end

add_path ~/.local/bin

if which direnv >/dev/null
eval (direnv hook fish)
end

0 comments on commit da5ce6c

Please sign in to comment.