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 ;
9 editor-class [ acme ] initialize
11 : plan9-path ( -- path )
18 : plan9-tool-path ( tool -- path )
19 [ plan9-path "/bin" append ] dip append-path ;
23 : (plumb-path) ( -- path )
24 "plumb" plan9-tool-path ;
26 : (massage-pathname) ( file line -- str )
27 over file-info regular-file?
28 [ number>string 2array ":" join ]
33 M: acme editor-command ( file line -- command )
34 [ (plumb-path) , "-d" , "edit" , (massage-pathname) , ] { } make ;