terminfo: cleaner, use %c on linux.
parent
1d93236129
commit
4fd874bbdc
|
@ -65,9 +65,13 @@ PRIVATE>
|
||||||
: file>terminfo ( path -- terminfo )
|
: file>terminfo ( path -- terminfo )
|
||||||
binary [ read-terminfo ] with-file-reader ;
|
binary [ read-terminfo ] with-file-reader ;
|
||||||
|
|
||||||
: terminfo-path ( name -- path )
|
HOOK: terminfo-path os ( name -- path )
|
||||||
[ first os macosx? [ >hex ] when ] keep
|
|
||||||
"/usr/share/terminfo/%s/%s" sprintf ;
|
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 )
|
MEMO: terminfo-names ( -- names )
|
||||||
"/usr/share/terminfo" [
|
"/usr/share/terminfo" [
|
||||||
|
|
Loading…
Reference in New Issue