2023-10-31 14:47:59 -04:00
|
|
|
/**
|
2023-10-31 17:38:15 -04:00
|
|
|
* The main entrypoint when using Bun as the runtime
|
2023-10-31 14:47:59 -04:00
|
|
|
*/
|
2023-10-31 17:38:15 -04:00
|
|
|
|
2023-11-06 15:36:41 -05:00
|
|
|
import { getTermios } from "../common/termios.ts";
|
|
|
|
export * from './terminal_io.ts';
|
2023-10-31 17:38:15 -04:00
|
|
|
|
2023-11-06 15:36:41 -05:00
|
|
|
export async function init() {
|
2023-11-01 15:25:52 -04:00
|
|
|
const t = await getTermios();
|
2023-10-31 17:38:15 -04:00
|
|
|
|
2023-11-06 15:36:41 -05:00
|
|
|
process.on('exit', () => {
|
|
|
|
console.info('Disabling raw mode');
|
2023-11-01 14:00:40 -04:00
|
|
|
t.disableRawMode();
|
2023-11-06 15:36:41 -05:00
|
|
|
})
|
2023-11-02 13:06:48 -04:00
|
|
|
}
|