diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-10 16:15:43 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-10 16:15:43 +1200 |
commit | 9e7d95c4946d850d368ab16dedf77f7dfd6d3b1e (patch) | |
tree | 5f31caad6b071d8b0bde1d0591b5ff7f318bdb6d | |
parent | Merge branch 'release/v5.32.0' (diff) | |
parent | Bump VERSION (diff) | |
download | dotfiles-9e7d95c4946d850d368ab16dedf77f7dfd6d3b1e.tar.gz dotfiles-9e7d95c4946d850d368ab16dedf77f7dfd6d3b1e.zip |
Merge branch 'release/v5.33.0'v5.33.0
* release/v5.33.0:
Limit scope of UTC function
Add bang to function declaration so it redefines
Prevent me from using `which`
-rw-r--r-- | VERSION | 4 | ||||
-rw-r--r-- | bash/bashrc.d/which.bash | 4 | ||||
-rw-r--r-- | sh/shrc.d/which.sh | 4 | ||||
-rw-r--r-- | vim/vimrc | 6 |
4 files changed, 13 insertions, 5 deletions
@@ -1,2 +1,2 @@ -tejr dotfiles v5.32.0 -Mon Jun 10 02:46:47 UTC 2019 +tejr dotfiles v5.33.0 +Mon Jun 10 04:15:43 UTC 2019 diff --git a/bash/bashrc.d/which.bash b/bash/bashrc.d/which.bash new file mode 100644 index 00000000..2d7084e6 --- /dev/null +++ b/bash/bashrc.d/which.bash @@ -0,0 +1,4 @@ +which() { + printf >&2 'Whichcraft detected! Did you mean: type -P %s\n' "$*" + return 2 +} diff --git a/sh/shrc.d/which.sh b/sh/shrc.d/which.sh new file mode 100644 index 00000000..9d8c899a --- /dev/null +++ b/sh/shrc.d/which.sh @@ -0,0 +1,4 @@ +which() { + printf >&2 'Whichcraft detected! Did you mean: command -v %s\n' "$*" + return 2 +} @@ -143,7 +143,7 @@ endif " final one, since every directory we want to create in this file should be " locked down in this way. " -function s:EnsureDir(path) abort +function! s:EnsureDir(path) abort let path = expand(a:path) return isdirectory(path) \ || exists('*mkdir') && mkdir(path, 'p', 0700) @@ -1185,12 +1185,12 @@ command PutDate " getenv() and setenv() functions does not seem to fix it. It works fine in " Debian GNU/Linux's packaged v8.0.x. " -function! UTC(command) abort +function! s:UTC(command) abort let tz = expand('$TZ') let $TZ = 'UTC' | execute a:command | let $TZ = tz endfunction command -complete=command -nargs=1 UTC - \ call UTC(<q-args>) + \ call s:UTC(<q-args>) " Leader,d inserts the local date (RFC 2822) nnoremap <Leader>d |