From 73894bb252d1d136c0db91cf102cbf2ec0e00144 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Wed, 30 Dec 2020 19:26:15 +0000 Subject: [PATCH] Make the update and view file changes use all command line positions Instead of using $1 for file names, $* is used which results in spaces being allowed without quoting. This is in line with how the new command works. As an example, it means the command ``` kb edit this is a test ``` will try and edit a file with the title "this is a test" rather than "this" --- inc/file-management | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inc/file-management b/inc/file-management index 7ddec7e..f4ec296 100644 --- a/inc/file-management +++ b/inc/file-management @@ -124,7 +124,7 @@ updateFileChange(){ local newFilename local filetype="normal" local ext - filename="$(findFile "$1")" + filename="$(findFile "$*")" ext="${filename##*.}" [ ! -e "$filename" ] && die "No such file $1" if echo "$filename" | grep -q '^assets/'; then @@ -204,7 +204,7 @@ viewFile(){ vecho "viewFile $*" cd "$dataDir" || return - local id="$1" + local id="$*" local filename filename="$(findFile "$id")"