From f697e616d3226453920be84b840c538196f40ee1 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sat, 22 Jan 2022 21:33:28 -0800 Subject: [PATCH] [zsh] Remove the wrapping init_path function --- zsh/func/init_path | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/zsh/func/init_path b/zsh/func/init_path index 707f92e..ee8441a 100644 --- a/zsh/func/init_path +++ b/zsh/func/init_path @@ -1,27 +1,21 @@ #!/usr/bin/env zsh -# Initialize the path to a standard default # Eryn Wells -autoload prepend_to_path -autoload append_to_path +autoload -Uz prepend_to_path +autoload -Uz append_to_path -function init_path -{ - export path=() - append-to-path "/opt/brew/bin" - append-to-path "/opt/homebrew/bin" - append_to_path "/usr/local/bin" - append_to_path "/usr/bin" - append_to_path "/bin" - append_to_path "/usr/local/sbin" - append_to_path "/usr/sbin" - append_to_path "/sbin" - prepend_to_path "/usr/X11/bin" - prepend_to_path "/opt/local/bin" - prepend_to_path "$HOME/.local/bin" - prepend_to_path "$HOME/.gem/ruby/2.2.0/bin" - prepend_to_path "$HOME/.cargo/bin" - prepend_to_path "$HOME/bin" -} - -init_path +export path=() +append_to_path "/opt/brew/bin" +append_to_path "/opt/homebrew/bin" +append_to_path "/usr/local/bin" +append_to_path "/usr/bin" +append_to_path "/bin" +append_to_path "/usr/local/sbin" +append_to_path "/usr/sbin" +append_to_path "/sbin" +prepend_to_path "/usr/X11/bin" +prepend_to_path "/opt/local/bin" +prepend_to_path "$HOME/.local/bin" +prepend_to_path "$HOME/.gem/ruby/2.2.0/bin" +prepend_to_path "$HOME/.cargo/bin" +prepend_to_path "$HOME/bin"