Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
home
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Murukesh Mohanan
home
Commits
6a8a99d9
Commit
6a8a99d9
authored
Jan 31, 2017
by
Murukesh Mohanan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pathmunge FTW
parent
86695d07
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
8 deletions
+36
-8
.conflocal/work/.zshrc
.conflocal/work/.zshrc
+1
-5
.vim
.vim
+1
-1
.zprofile
.zprofile
+34
-2
No files found.
.conflocal/work/.zshrc
View file @
6a8a99d9
bindkey
'^[[1;C'
backward-word
bindkey
'^[[1;D'
forward-word
for
f
in
/usr/local/Cellar/
*
/
*
/libexec/gnubin ~/Library/Python/
*
/bin
do
PATH
=
$f
:
$PATH
MANPATH
=
${
f
%/libexec/gnubin
}
/share/man:
$MANPATH
done
pathmunge /usr/local/Cellar/
*
/
*
/libexec/gnubin ~/Library/Python/
*
/bin
$GOPATH
/bin
.vim
@
dc7cad30
Subproject commit
3ac27820b16ff32871f592d522f34c05637eeb5b
Subproject commit
dc7cad30b21e669542b30537d1c08c4e9bc07b76
.zprofile
View file @
6a8a99d9
[[ -d $HOME/bin ]] && export PATH=$HOME/bin:$PATH
[[ -d $HOME/apps/bin ]] && export PATH="$HOME/apps/bin:$PATH"
pathmunge() {
local path_array before
# The default is to prepend the argument to PATH
before=1
case $1 in
after)
before=
;&
before)
shift
;;
esac
# Split PATH on : into an array
path_array=(${(As.:.)PATH})
# Then remove the arguments from it, since they are to be added in the
# order specified
path_array=(${path_array:|argv})
if [[ -n $before ]]
then
# Reverse the order of the arguments, so that:
# for f in ...; pathmunge f
# and
# pathmunge ...
# have the same effect.
path_array=(${(Oa)argv} $path_array)
else
path_array=($path_array $argv)
fi
# Concatenate the array back to PATH
export PATH="${(j.:.)path_array}"
}
[[ -n $GOPATH ]] && pathmunge "$GOPATH/bin"
[[ -d $HOME/bin ]] && pathmunge $HOME/bin
export EDITOR=vim
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment