Skip to content

Commit a0221ff

Browse files
committed
Always call system commands silently
This prevents annoying messages like "Command terminated" in #13. We already do custom error handling anyway.
1 parent 58a4ba8 commit a0221ff

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

autoload/lumen/platforms/linux.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func lumen#platforms#linux#parse_line(line)
2424
endfunc
2525

2626
func lumen#platforms#linux#oneshot()
27-
let out = trim(system('gdbus call -t 1 --session --dest=org.freedesktop.portal.Desktop --object-path=/org/freedesktop/portal/desktop --method=org.freedesktop.portal.Settings.Read org.freedesktop.appearance color-scheme'))
27+
silent let out = trim(system('gdbus call -t 1 --session --dest=org.freedesktop.portal.Desktop --object-path=/org/freedesktop/portal/desktop --method=org.freedesktop.portal.Settings.Read org.freedesktop.appearance color-scheme'))
2828
if match(out, "(<<uint32 ") == 0
2929
call lumen#platforms#linux#parse_line(s:watched_line . strcharpart(out, 10, 1) . ">)")
3030
else

autoload/lumen/platforms/macos.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ func lumen#platforms#macos#parse_line(line)
1313
endfunc
1414

1515
func lumen#platforms#macos#oneshot()
16-
let out = get(systemlist(printf("%s get || swiftc %s.swift -o %s", s:exe, s:exe, s:exe)), 0)
16+
silent let out = get(systemlist(printf("%s get || swiftc %s.swift -o %s", s:exe, s:exe, s:exe)), 0)
1717
if len(out) != 5
1818
let err = out
1919
" fallback
20-
let out = get(systemlist(s:exe . ".swift get"), 0)
20+
silent let out = get(systemlist(s:exe . ".swift get"), 0)
2121
endif
2222

2323
if len(out) == 5

autoload/lumen/platforms/windows.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func lumen#platforms#windows#parse_line(line)
1515
endfunc
1616

1717
func lumen#platforms#windows#oneshot()
18-
let out = system('reg.exe query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v AppsUseLightTheme')->trim()->split('\r\n')
18+
silent let out = system('reg.exe query "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v AppsUseLightTheme')->trim()->split('\r\n')
1919
if len(out)
2020
call lumen#platforms#windows#parse_line(out[-1])
2121
endif

0 commit comments

Comments
 (0)