From 26169efea1f2d7891eef957ec414b28c9a8e1d41 Mon Sep 17 00:00:00 2001 From: glacambre Date: Sat, 27 Oct 2018 13:20:18 +0200 Subject: [PATCH] excmds.ts: Fix setpref breaking user.js when value contains spaces Before this commit, `:setpref my_pref "my value"` broke user.js by only writing '"my' to the file. This created a syntax error and prevented firefox from reading the rest of the file. This commit fixes that. --- src/excmds.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/excmds.ts b/src/excmds.ts index 75bbcf63..ee26ad81 100644 --- a/src/excmds.ts +++ b/src/excmds.ts @@ -805,8 +805,8 @@ export async function colourscheme(themename: string) { * `setpref extensions.webextensions.restricterDomains ""` */ //#background -export async function setpref(key: string, value: string) { - await Native.writePref(key, value) +export async function setpref(key: string, ...value: string[]) { + await Native.writePref(key, value.join(" ")) } /**