From 438895364239806dfe7bae01b7df0f66be9383e8 Mon Sep 17 00:00:00 2001 From: Ignas Anikevicius Date: Sun, 18 Jul 2021 16:38:06 +0300 Subject: [PATCH] Support default 'date' on nvim 0.5 on OSX Currently attempting to create a monthly summary by pressing `wm` leads to an error: ``` Error detected while processing function wiki#journal#freq[16]..wiki#date#format[1]..92_date: line 5: E766: Insufficient arguments for printf() ``` This attempts to work around this by passing the format of the date as a parameter to `printf` such that it is not attempting to interpret the date format as parameters to `printf` itself. --- autoload/wiki/date.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/wiki/date.vim b/autoload/wiki/date.vim index ec780486..471003f0 100644 --- a/autoload/wiki/date.vim +++ b/autoload/wiki/date.vim @@ -157,7 +157,7 @@ function! s:date(date, format) abort " {{{1 \ . ' +"%s" -d "%s"', a:format, a:date))[0] else return systemlist(printf(s:cmd_date - \ . ' -j -f "%Y-%m-%d" "%s" +"%s"', a:date, a:format))[0] + \ . ' -j -f "%s" "%s" +"%s"', "%Y-%m-%d", a:date, a:format))[0] endif endfunction