Implement take command and comments (--) + misc cleanup
This commit is contained in:
@@ -28,7 +28,10 @@ import * as fs from "node:fs";
|
||||
|
||||
const exec = new Executor(output, parser, input)
|
||||
exec.adoptLifecycle(lifecycle)
|
||||
exec.subscribe(state => state.outputSubject())
|
||||
|
||||
console.log('`str` : An interactive string manipulation environment')
|
||||
console.log('Copyright (C) 2026 Garrett Mills <shout@garrettmills.dev>')
|
||||
console.log('')
|
||||
|
||||
const rcFile = processPath('~/.str.rc')
|
||||
if ( fs.existsSync(rcFile) ) {
|
||||
@@ -36,8 +39,11 @@ import * as fs from "node:fs";
|
||||
|
||||
const rcFileContent = fs.readFileSync(rcFile).toString()
|
||||
await input.pushLines('\n' + rcFileContent)
|
||||
|
||||
console.log('Successfully loaded ~/.str.rc\n')
|
||||
}
|
||||
|
||||
exec.subscribe(state => state.outputSubject())
|
||||
input.setupPrompt()
|
||||
|
||||
process.on('SIGINT', () => lifecycle.close())
|
||||
|
||||
Reference in New Issue
Block a user