1 ! Copyright (C) 2020 Fred Alger
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: arrays editors environment io.files.info io.pathnames
4 kernel make math.parser namespaces sequences ;
8 acme editor-class set-global
10 : plan9-path ( -- path )
17 : plan9-tool-path ( tool -- path )
18 [ plan9-path "/bin" append ] dip append-path ;
22 : (plumb-path) ( -- path )
23 "plumb" plan9-tool-path ;
25 : (massage-pathname) ( file line -- str )
26 over file-info regular-file?
27 [ number>string 2array ":" join ]
32 M: acme editor-command ( file line -- command )
33 [ (plumb-path) , "-d" , "edit" , (massage-pathname) , ] { } make ;