Skip to content
Snippets Groups Projects
Commit 732fc822 authored by nimrod's avatar nimrod
Browse files

- Refactored Bash completion scripts, the generated parts are during Git

post-merge.
- Moved direnv to .bashrc, it shouldn't have been in .bash_completion.d
to begin with.
- Added a copy of pythonrc.py (from
https://github.com/lonetwin/pythonrc/).
- Generate Python startup script.
- Output during post-merge to stderr.
parent e93c7119
No related branches found
No related tags found
No related merge requests found
#!/bin/sh
if which direnv > /dev/null
then
[ -f "$HOME/.bash_completion.d/.direnv" ] || direnv hook bash > "$HOME/.bash_completion.d/.direnv"
# shellcheck disable=SC1090
. "$HOME/.bash_completion.d/.direnv"
fi
! which pandoc > /dev/null || eval "$(pandoc --bash-completion)"
#!/bin/sh
if which pipenv > /dev/null
then
[ -f "$HOME/.bash_completion.d/.pipenv" ] || pipenv --completion > "$HOME/.bash_completion.d/.pipenv"
# shellcheck disable=SC1090
. "$HOME/.bash_completion.d/.pipenv"
fi
...@@ -18,7 +18,7 @@ export PATH="$HOME/Documents/Shore/ssl-ca:$PATH" ...@@ -18,7 +18,7 @@ export PATH="$HOME/Documents/Shore/ssl-ca:$PATH"
export PATH="$HOME/.cargo/bin:$PATH" export PATH="$HOME/.cargo/bin:$PATH"
export PATH="$HOME/.cabal/bin:$PATH" export PATH="$HOME/.cabal/bin:$PATH"
export PATH="$HOME/Documents/bin:$PATH" export PATH="$HOME/Documents/bin:$PATH"
export PYTHONSTARTUP=~/.pythonstartup export PYTHONSTARTUP=~/.config/python/startup.py
export AWS_DEFAULT_PROFILE='shore' export AWS_DEFAULT_PROFILE='shore'
export ANSIBLE_VERBOSITY=2 export ANSIBLE_VERBOSITY=2
export ANSIBLE_COMMAND_WARNINGS=True export ANSIBLE_COMMAND_WARNINGS=True
...@@ -205,8 +205,10 @@ then ...@@ -205,8 +205,10 @@ then
do do
[ ! -f "$sourcefile" ] || . "$sourcefile" [ ! -f "$sourcefile" ] || . "$sourcefile"
done done
! which direnv > /dev/null || eval $(direnv hook bash)
fi fi
# make less more friendly for non-text input files, see lesspipe(1) # make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
......
This diff is collapsed.
File moved
#!/bin/sh #!/bin/sh
set -eu set -eu
cd "$(git rev-parse --show-toplevel)" cd "$(git rev-parse --show-toplevel)"
echo Installing Git hooks echo Installing Git hooks >> /dev/stderr
Documents/bin/install-git-hooks Documents/bin/install-git-hooks
echo Generating SSH config echo Generating SSH config >> /dev/stderr
Documents/bin/gen-ssh-config Documents/bin/gen-ssh-config
echo Loading dconf config echo Loading dconf config >> /dev/stderr
Documents/bin/dconf-load Documents/bin/dconf-load
echo Configuring Git repo echo Configuring Git repo >> /dev/stderr
git config --local status.showUntrackedFiles no git config --local status.showUntrackedFiles no
echo Creating Python startup file >> /dev/stderr
Documents/bin/gen-python-startup
echo Creating Bash completion scripts >> /dev/stderr
Documents/bin/gen-bash-completion
echo Adding Cron job >> /dev/stderr
Documents/bin/cron-jobs
...@@ -10,6 +10,7 @@ repos: ...@@ -10,6 +10,7 @@ repos:
- id: detect-aws-credentials - id: detect-aws-credentials
- id: detect-private-key - id: detect-private-key
- id: flake8 - id: flake8
exclude: pythonrc.py
- repo: https://www.shore.co.il/git/shell-pre-commit/ - repo: https://www.shore.co.il/git/shell-pre-commit/
sha: v0.6.0 sha: v0.6.0
hooks: hooks:
......
#!/bin/sh
set -eu
! which pandoc > /dev/null || pandoc --bash-completion > "$HOME/.bash_completion.d/pandoc"
! which pipenv > /dev/null || pipenv --completion > "$HOME/.bash_completion.d/pipenv"
#!/bin/sh
set -eu
find "$HOME/.config/python/startup" -type f \! -name '.*' -print0 | sort --zero | xargs -0 cat > "$HOME/.config/python/startup.py"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment