diff options
Diffstat (limited to '.zshrc')
| -rw-r--r-- | .zshrc | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/.zshrc b/.zshrc index 25d0ef6..14c2b54 100644 --- a/.zshrc +++ b/.zshrc @@ -8,6 +8,9 @@ # per-device configuration (post) <dev-post> +export DOTFILES="$(dirname "$(readlink -f "${(%):-%x}")")" + + # //// per-device configuration //////////////////////////////// <dev-pre> // # # Per-device configuration is kept here in dotfiles.git too, but it won't be @@ -20,6 +23,7 @@ device_preconfig() { source ~/.device_pre + [[ -v ACME ]] && source "$DOTFILES/device/acme_pre" } # The post-config file is intended to run commands that are so specialized to @@ -28,6 +32,7 @@ device_preconfig() { device_postconfig() { source ~/.device_post + [[ -v ACME ]] && source "$DOTFILES/device/acme_post" } device_preconfig @@ -42,12 +47,13 @@ export HISTSIZE=2000 autoload -Uz select-word-style select-word-style bash -if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then +if [ -x /usr/bin/tput ] && [[ ${TERM} != "dumb" ]] && tput setaf 1 >&/dev/null; then autoload -U colors && colors PS1=$'\e[0;32;1m%n\e[0;32m@\e[32;1m%m \e[34m%1~ \e[0m%# ' PROMPT="%F{green}%B%n%b@%B%m %F{blue}%1~%b%f %# " else PS1=$'%n@%m %1~ %# ' + unset zle_bracketed_paste fi path+=("$HOME/bin") @@ -91,6 +97,17 @@ if [[ -v DEVICE_HAS_NVM ]]; then [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" fi +# -- Plan 9 -- + +if [[ -v DEVICE_HAS_PLAN9 ]]; then + export PLAN9="$DEVICE_PLAN9_INSTALLATION" + path+=("$PLAN9/bin") + + plumber 2>/dev/null + + alias acme='SHELL="'"$DOTFILES"'"/scripts/acme/acme-shell acme' +fi + # -- Python -- if [[ -v DEVICE_HAS_PYTHON_3 ]]; then |