revert commented out path code

This commit is contained in:
Daylin Morgan 2022-04-13 00:53:47 -05:00
parent 6080ff7531
commit 3ea2b94f5a

View file

@ -1,13 +1,13 @@
# Start with system path # Start with system path
# Retrieve it from getconf, otherwise it's just current $PATH # Retrieve it from getconf, otherwise it's just current $PATH
#is-executable getconf && PATH=$($(command -v getconf) PATH) is-executable getconf && PATH=$($(command -v getconf) PATH)
# Prepend new items to path (if directory exists) # Prepend new items to path (if directory exists)
# prepend-path "/bin" prepend-path "/bin"
# prepend-path "/usr/bin" prepend-path "/usr/bin"
# prepend-path "/usr/local/bin" prepend-path "/usr/local/bin"
PATH="$DOTFILES_DIR/bin:$PATH" PATH="$DOTFILES_DIR/bin:$PATH"
PATH="$HOME/bin:$PATH" PATH="$HOME/bin:$PATH"
PATH="$HOME/.local/bin:$PATH" PATH="$HOME/.local/bin:$PATH"
@ -22,12 +22,11 @@ PATH="$HOME/go/bin:$PATH"
# Remove duplicates (preserving prepended items) # Remove duplicates (preserving prepended items)
# Source: http://unix.stackexchange.com/a/40755 # Source: http://unix.stackexchange.com/a/40755
# PATH=$(echo -n $PATH | awk -v RS=: '{ if (!arr[$0]++) {printf("%s%s",!ln++?"":":",$0)}}') PATH=$(echo -n $PATH | awk -v RS=: '{ if (!arr[$0]++) {printf("%s%s",!ln++?"":":",$0)}}')
# PATH="$(perl -e 'print join(":", grep { not $seen{$_}++ } split(/:/, $ENV{PATH}))')" PATH="$(perl -e 'print join(":", grep { not $seen{$_}++ } split(/:/, $ENV{PATH}))')"
# printf %s "$PATH" | awk -v RS=: -v ORS=: '!arr[$0]++'
PATH=$(printf %s "$PATH" | # PATH=$(printf %s "$PATH" |
awk -vRS=: -vORS= '!a[$0]++ {if (NR>1) printf(":"); printf("%s", $0) }') # awk -vRS=: -vORS= '!a[$0]++ {if (NR>1) printf(":"); printf("%s", $0) }')
# Wrap up # # Wrap up
export PATH export PATH