Skip to content

Commit f4d7a3e

Browse files
author
Brian Holdsworth
committed
FIX: assign command can work with absolute path
FIX: fuzzy search in arcade.app can handle very large libraries
1 parent ce06e1f commit f4d7a3e

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

cbm/arcade.app.d/search.lua

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,20 @@
44
search.get = function(str)
55
Start a new search
66
--]]
7-
local search, fzfin = {}, ""
7+
local search, fzfin = {}, '/tmp/arcade-fzf'
88

99
search.setdb = function(data)
10+
local f,_ = io.open(fzfin, 'w')
11+
assert(f, "Failed to create fzf search file")
12+
1013
for i,v in ipairs(data['alpha']) do
11-
fzfin = fzfin .. string.format("%d %s\n", i, v[1])
14+
f:write(string.format("%d %s\n", i, v[1]))
1215
end
16+
f:close()
1317
end
1418

1519
search.get = function(str)
16-
local cmd = string.format('echo -e "%s" | fzf --filter="%s" --with-nth=2', fzfin, str)
20+
local cmd = string.format('fzf --filter="%s" --with-nth=2 < "%s"', str, fzfin)
1721
local f = assert(io.popen(cmd, 'r'))
1822
local matches = {}
1923

cbm/dos.app.s

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,6 +1486,8 @@ assign = *
14861486
assignNextArg = *
14871487
lda mtArg
14881488
beq assignCont
1489+
cmp #2
1490+
beq asRequiredArg
14891491
ldy #0
14901492
jsr getarg
14911493
ldy #0

0 commit comments

Comments
 (0)