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"
This commit is contained in:
parent
05e5cac976
commit
73894bb252
1 changed files with 2 additions and 2 deletions
|
@ -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")"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue