Skip to content

Commit 8b4555b

Browse files
authored
fix(template): Use env variable USERNAME in Windows (#931)
* fix(template): Use env variable USERNAME in Windows * fix(template): Check windows environment inline
1 parent 6e94aee commit 8b4555b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lua/orgmode/capture/template/init.lua

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ local expansions = {
1414
return vim.fn.expand('%:p')
1515
end,
1616
['%%n'] = function()
17+
if vim.fn.has('win32') == 1 then
18+
return os.getenv('USERNAME')
19+
end
1720
return os.getenv('USER')
1821
end,
1922
['%%x'] = function()

0 commit comments

Comments
 (0)