Update paths.
Signed-off-by: Jacob Kiers <jacob@jacobkiers.net>
This commit is contained in:
parent
bba2f8edac
commit
ae3b45b0ab
@ -30,6 +30,8 @@ done
|
||||
export LC_ALL=en_US.UTF-8
|
||||
export LANG="en_US"
|
||||
|
||||
# Set the composer home.
|
||||
export COMPOSER_HOME="$HOME/.composer"
|
||||
|
||||
# Prepend $PATH without duplicates
|
||||
function _prepend_path() {
|
||||
@ -39,14 +41,15 @@ function _prepend_path() {
|
||||
}
|
||||
|
||||
# Construct $PATH
|
||||
PATH='/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin'
|
||||
[ -d /sbin ] && _prepend_path "/sbin"
|
||||
[ -d /usr/sbin ] && _prepend_path "/usr/sbin"
|
||||
[ -d /bin ] && _prepend_path "/bin"
|
||||
[ -d /usr/bin ] && _prepend_path "/usr/bin"
|
||||
[ -d /usr/texbin ] && _prepend_path "/usr/texbin"
|
||||
[ -d /usr/local/sbin ] && _prepend_path "/usr/local/sbin"
|
||||
[ -d /usr/local/bin ] && _prepend_path "/usr/local/bin"
|
||||
[ -d /usr/local/share/npm/bin ] && _prepend_path "/usr/local/share/npm/bin"
|
||||
[ -d /usr/local/opt/ruby/bin ] && _prepend_path "/usr/local/opt/ruby/bin"
|
||||
[ -d /usr/local/share/python ] && _prepend_path "/usr/local/share/python"
|
||||
command -v brew >/dev/null 2>&1 && _prepend_path "$(brew --prefix coreutils)/libexec/gnubin"
|
||||
[ -d "$COMPOSER_HOME/vendor/bin" ] && _prepend_path "$COMPOSER_HOME/vendor/bin"
|
||||
[ -d ~/dotfiles/bin ] && _prepend_path "$HOME/dotfiles/bin"
|
||||
[ -d ~/bin ] && _prepend_path "$HOME/bin"
|
||||
export PATH
|
||||
@ -86,22 +89,6 @@ function _ssh_reload_autocomplete() {
|
||||
}
|
||||
_ssh_reload_autocomplete
|
||||
|
||||
# Grunt completion
|
||||
command -v grunt >/dev/null 2>&1 && eval "$(grunt --completion=bash)"
|
||||
|
||||
# Tamia generator completion
|
||||
function _tamia_autocomplete() {
|
||||
# List of subgenerators
|
||||
local available=$(for file in /usr/local/share/npm/lib/node_modules/generator-tamia/*/index.js; do echo $file | cut -d / -f 9; done)
|
||||
# The word fragment
|
||||
local word=${COMP_WORDS[COMP_CWORD]}
|
||||
# Don’t attempt to filter w/`grep` if `$word` is empty
|
||||
local filtered=$(if [ -z "$word" ]; then echo "$available"; else echo "$available" | grep $word; fi)
|
||||
|
||||
COMPREPLY=($filtered)
|
||||
}
|
||||
command -v yo >/dev/null 2>&1 && complete -F _tamia_autocomplete tm
|
||||
|
||||
# Tell ls to be colourful
|
||||
export CLICOLOR=1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user