summaryrefslogtreecommitdiffstats
path: root/config/sh
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2018-11-16 03:20:56 -0500
committerJesse Luehrs <doy@tozt.net>2018-11-16 03:20:56 -0500
commit790064c91f1291b55ac3a6627c41c8181e4b6b42 (patch)
tree8fc98a0e9326613def8174eda79189ff02428d73 /config/sh
parent654d626159e1fab6bb6cd85c4ad593ea260c3195 (diff)
downloadconf-790064c91f1291b55ac3a6627c41c8181e4b6b42.tar.gz
conf-790064c91f1291b55ac3a6627c41c8181e4b6b42.zip
shellcheck
Diffstat (limited to 'config/sh')
-rw-r--r--config/sh/aliases4
-rw-r--r--config/sh/env6
-rw-r--r--config/sh/functions4
3 files changed, 8 insertions, 6 deletions
diff --git a/config/sh/aliases b/config/sh/aliases
index c764f38..fa479aa 100644
--- a/config/sh/aliases
+++ b/config/sh/aliases
@@ -13,8 +13,8 @@ type sudo-askpass > /dev/null 2>&1 && alias sudo="sudo -A"
# }}}
# games {{{
alias nao="env TERM=rxvt telnet nethack.alt.org"
-alias cao="env TERM=rxvt /usr/bin/ssh -C -i $HOME/.ssh/cao_key joshua@crawl.akrasiac.org"
-alias cdo="ssh -C -i $HOME/.ssh/cao_key crawl@crawl.develz.org"
+alias cao="env TERM=rxvt /usr/bin/ssh -C -i \$HOME/.ssh/cao_key joshua@crawl.akrasiac.org"
+alias cdo="ssh -C -i \$HOME/.ssh/cao_key crawl@crawl.develz.org"
# }}}
# termcast {{{
alias tc="telnet termcast.org"
diff --git a/config/sh/env b/config/sh/env
index 218ddde..dd54019 100644
--- a/config/sh/env
+++ b/config/sh/env
@@ -1,7 +1,9 @@
-export GPG_TTY=$(tty)
+GPG_TTY=$(tty)
+export GPG_TTY
export MANPAGER="$HOME/.bin/vimmanpager"
export PERLDOC_PAGER="$HOME/.bin/vimmanpager"
-export EDITOR=$(/usr/bin/which vim)
+EDITOR=$(command -v vim)
+export EDITOR
ssh="${HOME}/.bin/$(hostname)/ssh"
if [ -x "$ssh" ]; then
export GIT_SSH="$ssh"
diff --git a/config/sh/functions b/config/sh/functions
index d6068e0..a662f2d 100644
--- a/config/sh/functions
+++ b/config/sh/functions
@@ -11,9 +11,9 @@ function cdu {
local root
root="$(git rev-parse --show-superproject-working-tree 2>/dev/null)"
if [ -n "$root" ]; then
- cd "$root"
+ cd "$root" || return
else
- cd "$(git rev-parse --show-toplevel)"
+ cd "$(git rev-parse --show-toplevel)" || return
fi
}