diff --git a/extra/terminfo/terminfo.factor b/extra/terminfo/terminfo.factor index b5be4a7969..a9c453a8e6 100644 --- a/extra/terminfo/terminfo.factor +++ b/extra/terminfo/terminfo.factor @@ -65,9 +65,13 @@ PRIVATE> : file>terminfo ( path -- terminfo ) binary [ read-terminfo ] with-file-reader ; -: terminfo-path ( name -- path ) - [ first os macosx? [ >hex ] when ] keep - "/usr/share/terminfo/%s/%s" sprintf ; +HOOK: terminfo-path os ( name -- path ) + +M: macosx terminfo-path ( name -- path ) + [ first >hex ] keep "/usr/share/terminfo/%s/%s" sprintf ; + +M: linux terminfo-path ( name -- path ) + [ first ] keep "/usr/share/terminfo/%c/%s" sprintf ; MEMO: terminfo-names ( -- names ) "/usr/share/terminfo" [