aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-04-01 21:05:38 +1300
committerTom Ryder <tom@sanctum.geek.nz>2019-04-01 21:05:38 +1300
commitdd1b9b2e1ba1ee926400de248a2d9edce8378eaf (patch)
treeff3b4e4e7cb11216a8d2c7d2a984186fdfda3f61
parent4b72e339c6fe1fee22a81af7388afb73f66a9441 (diff)
parentd0a042c666b17defbcd5df6aaa19747b92d4e5cb (diff)
downloaddotfiles-dd1b9b2e1ba1ee926400de248a2d9edce8378eaf.tar.gz
Merge branch 'release/v4.18.0'v4.18.0
* release/v4.18.0: Bump VERSION Set 'keywordprg' to :help for older Vims Fix up a few cosmetic shell anti-patterns Remove unneeded leading pipe from b:undo_ftplugin
-rw-r--r--VERSION4
-rw-r--r--ksh/kshrc3
-rw-r--r--ksh/kshrc.d/prompt.ksh7
-rw-r--r--sh/shrc.d/ls.sh2
-rw-r--r--vim/after/ftplugin/vim.vim7
-rw-r--r--vim/ftplugin/textarea.vim2
-rw-r--r--zsh/zprofile4
-rw-r--r--zsh/zshrc4
-rw-r--r--zsh/zshrc.d/prompt.zsh7
9 files changed, 27 insertions, 13 deletions
diff --git a/VERSION b/VERSION
index 301d1d19..99e31cbf 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-tejr dotfiles v4.17.0
-Thu Mar 28 02:32:54 UTC 2019
+tejr dotfiles v4.18.0
+Mon Apr 1 08:05:38 UTC 2019
diff --git a/ksh/kshrc b/ksh/kshrc
index 1aea4b9d..26e0270c 100644
--- a/ksh/kshrc
+++ b/ksh/kshrc
@@ -21,6 +21,7 @@ HISTFILE=$HOME/.ksh_history
# Load any supplementary scripts
for ksh in "$HOME"/.kshrc.d/*.ksh ; do
- [[ -e $ksh ]] && . "$ksh"
+ [[ -e $ksh ]] || continue
+ . "$ksh"
done
unset -v ksh
diff --git a/ksh/kshrc.d/prompt.ksh b/ksh/kshrc.d/prompt.ksh
index 99e6238d..64e22e8e 100644
--- a/ksh/kshrc.d/prompt.ksh
+++ b/ksh/kshrc.d/prompt.ksh
@@ -14,7 +14,7 @@ function prompt {
on)
# Basic prompt shape depends on whether we're in SSH or not
PS1=
- if [[ -n $SSH_CLIENT ]] || [[ -n $SSH_CONNECTION ]] ; then
+ if [[ -n $SSH_CLIENT || -n $SSH_CONNECTION ]] ; then
PS1=$PS1'${HOSTNAME%%.*}:'
fi
@@ -176,8 +176,9 @@ function prompt {
fi
# There are some untracked and unignored files
- if git ls-files --directory --error-unmatch --exclude-standard \
- --no-empty-directory --others -- ':/*' ; then
+ if git ls-files --directory --error-unmatch \
+ --exclude-standard --no-empty-directory \
+ --others -- ':/*' ; then
state=${state}'?'
fi
diff --git a/sh/shrc.d/ls.sh b/sh/shrc.d/ls.sh
index 1083dfca..203a734f 100644
--- a/sh/shrc.d/ls.sh
+++ b/sh/shrc.d/ls.sh
@@ -28,7 +28,7 @@ ls() {
fi
## Add --color if the terminal has at least 8 colors
if [ -e "$HOME"/.cache/sh/opt/ls/color ] &&
- [ "$(exec 2>/dev/null;tput colors||tput Co||echo 0)" -ge 8 ] ; then
+ [ "$(exec 2>/dev/null;tput colors||tput Co||echo 0)" -ge 8 ] ; then
set -- --color=auto "$@"
fi
## Add --time-style='+%Y-%m-%d %H:%M:%S' to show the date in my preferred
diff --git a/vim/after/ftplugin/vim.vim b/vim/after/ftplugin/vim.vim
index 905d21dc..d2fa77e2 100644
--- a/vim/after/ftplugin/vim.vim
+++ b/vim/after/ftplugin/vim.vim
@@ -9,6 +9,13 @@ endif
let b:regex_escape_flavor = 'vim'
let b:undo_ftplugin .= '|unlet b:regex_escape_flavor'
+" Use :help as 'keywordprg' if not already set; this is the default since Vim
+" v8.1.1290
+if &keywordprg !=# ':help'
+ setlocal keywordprg=:help
+ let b:undo_ftplugin .= '|setlocal keywordprg<'
+endif
+
" Stop here if the user doesn't want ftplugin mappings
if exists('g:no_plugin_maps') || exists('g:no_vim_maps')
finish
diff --git a/vim/ftplugin/textarea.vim b/vim/ftplugin/textarea.vim
index b5c5ca98..7877c8db 100644
--- a/vim/ftplugin/textarea.vim
+++ b/vim/ftplugin/textarea.vim
@@ -7,4 +7,4 @@ endif
" areas I edit using TextEditorAnywhere
nnoremap <buffer> <LocalLeader>f
\ :<C-U>setlocal filetype=mail<CR>
-let b:undo_ftplugin = '|nunmap <buffer> <LocalLeader>f'
+let b:undo_ftplugin = 'nunmap <buffer> <LocalLeader>f'
diff --git a/zsh/zprofile b/zsh/zprofile
index 65586fe2..614672ba 100644
--- a/zsh/zprofile
+++ b/zsh/zprofile
@@ -1,2 +1,4 @@
# Source ~/.profile, since Zsh doesn't do this by default
-[[ -e $HOME/.profile ]] && source "$HOME"/.profile
+if [[ -e $HOME/.profile ]] ; then
+ source "$HOME"/.profile
+fi
diff --git a/zsh/zshrc b/zsh/zshrc
index 25d90ead..0aac527e 100644
--- a/zsh/zshrc
+++ b/zsh/zshrc
@@ -5,7 +5,9 @@
unalias -a >/dev/null 2>&1
# If ENV is set, source it to get all the POSIX-compatible interactive stuff
-[[ -n $ENV ]] && source "$ENV"
+if [[ -n $ENV ]] ; then
+ source "$ENV"
+fi
# Emacs keybindings even if EDITOR is vi(1)
bindkey -e
diff --git a/zsh/zshrc.d/prompt.zsh b/zsh/zshrc.d/prompt.zsh
index 689866e3..980d8669 100644
--- a/zsh/zshrc.d/prompt.zsh
+++ b/zsh/zshrc.d/prompt.zsh
@@ -10,7 +10,7 @@ prompt() {
# Basic prompt shape depends on whether we're in SSH or not
PS1=
- if [[ -n $SSH_CLIENT ]] || [[ -n $SSH_CONNECTION ]] ; then
+ if [[ -n $SSH_CLIENT || -n $SSH_CONNECTION ]] ; then
PS1=$PS1'%m:'
fi
PS1=$PS1'%~'
@@ -121,8 +121,9 @@ prompt() {
fi
# There are some untracked and unignored files
- if git ls-files --directory --error-unmatch --exclude-standard \
- --no-empty-directory --others -- ':/*' ; then
+ if git ls-files --directory --error-unmatch \
+ --exclude-standard --no-empty-directory \
+ --others -- ':/*' ; then
state=${state}'?'
fi