-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed from `eval` to async function Add scroll to lists Use @ts-check Moved built-in FS to common.ts
- Loading branch information
Showing
24 changed files
with
192 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/// <reference file="./lib.d.ts" > | ||
cd(args[1] || path.resolve('.'), true); | ||
/// <reference types="./lib.d.ts" /> | ||
// @ts-check | ||
__open(args[1] || path.resolve('.'), true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/// <reference file="./lib.d.ts" > | ||
/// <reference types="./lib.d.ts" /> | ||
// @ts-check | ||
terminal.writeln(args.slice(1).join(' ')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/// <reference file="./lib.d.ts" > | ||
/// <reference types="./lib.d.ts" /> | ||
// @ts-check | ||
terminal.writeln('Some unix commands available, ls /bin to see them.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,27 @@ | ||
declare const fs: typeof import('@zenfs/core').fs; | ||
declare const path: typeof import('@zenfs/core/emulation/path.js'); | ||
declare const chalk: typeof import('chalk').default; | ||
declare const terminal: import('@xterm/xterm').Terminal; | ||
declare const args: string[]; | ||
declare const utilium: typeof import('utilium'); | ||
import type { fs as _fs } from '@zenfs/core'; | ||
import type * as _path from '@zenfs/core/emulation/path.js'; | ||
import type _chalk from 'chalk'; | ||
import type { Terminal } from '@xterm/xterm'; | ||
import type * as _utilium from 'utilium'; | ||
|
||
declare global { | ||
const args: string[]; | ||
const terminal: Terminal; | ||
const fs: typeof _fs; | ||
const path: typeof _path; | ||
const chalk: typeof _chalk; | ||
const utilium: typeof _utilium; | ||
function __editor_open(path: string): Promise<void>; | ||
function __open(path: string, dirOnly?: boolean): void; | ||
} | ||
|
||
export interface ExecutionLocals { | ||
args: string[]; | ||
terminal: Terminal; | ||
fs: typeof _fs; | ||
path: typeof _path; | ||
chalk: typeof _chalk; | ||
utilium: typeof _utilium; | ||
__editor_open(this: void, path: string): Promise<void>; | ||
__open(this: void, path: string, dirOnly?: boolean): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/// <reference file="./lib.d.ts" > | ||
/// <reference types="./lib.d.ts" /> | ||
// @ts-check | ||
__editor_open(args[1]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/// <reference file="./lib.d.ts" > | ||
/// <reference types="./lib.d.ts" /> | ||
// @ts-check | ||
terminal.writeln(path.cwd); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.