Lots: Move .local/bin, add pip compatibility

God fucking dammit
Alright, so this is too damn long for a commit message but I don't care.
Debian apparrently adds a patch to pip that forces it to use the --user
flag. This COMPLETELY BREAKS defining target or prefix in pip.conf
As a workaround, I have to move all of my custom binaries to a different
directory and just hand .local/bin over to pip.
It's really dumb.
This commit is contained in:
Salt 2018-11-21 23:16:02 -06:00
parent 44303c7590
commit 913b4dc17d
7 changed files with 35 additions and 11 deletions

View File

@ -1 +1 @@
.local/bin/shrc/bashrc
.bin/shrc/bashrc

1
.bin Submodule

@ -0,0 +1 @@
Subproject commit 03b31b1da6c8ea901ef51616bb82ba783d0b321e

2
.gitmodules vendored
View File

@ -20,7 +20,7 @@
path = .vim/bundle/incsearch.vim
url = https://github.com/haya14busa/incsearch.vim.git
[submodule ".local/bin"]
path = .local/bin
path = .bin
url = git@gitlab.com:rehashedsalt/bin
[submodule ".vim/bundle/lightline.vim"]
path = .vim/bundle/lightline.vim

2
.kshrc
View File

@ -1 +1 @@
.local/bin/shrc/kshrc
.bin/shrc/kshrc

@ -1 +0,0 @@
Subproject commit d6ea041d745103045598f797827324be15f48960

View File

@ -27,14 +27,11 @@
# Environment variables
# Use Vim if we have it
if `which vim > /dev/null 2>&1`; then
export EDITOR="vim"
else
export EDITOR="vi"
fi
which vim > /dev/null 2>&1 && export EDITOR="vim"
# Patch PATH
desiredpath="/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/games:/usr/games:$HOME/.local/bin"
desiredpath="/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/games:/usr/games:$HOME/.local/bin:$HOME/.local/bin/pip"
# Here, we eliminate the parts of the environment-supplied PATH that we already
# plan on using
IFS=":"
@ -52,6 +49,33 @@ PATH="$desiredpath:$PATH"
# Grab bash_completion, if it exists
[ -f "/etc/profile.d/bash_completion.sh" ] && . "/etc/profile.d/bash_completion.sh"
# Grab pip completion, if it exists
if which pip > /dev/null 2>&1; then
case "$(basename "$SHELL")" in
*bash)
if ! [ -f "$HOME/.pip-completion-bash" ]; then
pip completion --bash > "$HOME/.pip-completion-bash"
echo ".profile: Created pip completion for bash"
fi
source "$HOME/.pip-completion-bash"
;;
zsh)
if ! [ -f "$HOME/.pip-completion-zsh" ]; then
pip completion --zsh > "$HOME/.pip-completion-zsh"
echo ".profile: Created pip completion for zsh"
fi
source "$HOME/.pip-completion-zsh"
;;
*)
;;
esac
# Debian patches pip to assume the --user flag by default
# This breaks using installation targets and prefixes
# It's really dumb
pipargs="--system"
alias pip="pip $pipargs"
fi
# If emerge exists, add emerge aliases
if `which emerge > /dev/null 2>&1` ; then
alias e-depclean='sudo emerge -a --depclean'

2
.zshrc
View File

@ -1 +1 @@
.local/bin/shrc/zshrc
.bin/shrc/zshrc