- Fixed sort.ts
- Fixed `cd`
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import type { FileSystem } from "./filesystem/filesystem";
|
||||
import type { NodePointer } from "./filesystem/node";
|
||||
import { addHistoryEntry } from "./history_state";
|
||||
import type { GroupInfo, UserInfo } from "./session_manager";
|
||||
import { createInitialSessionState, getCurrentSession, type SessionState } from "./session_manager";
|
||||
@@ -38,14 +39,14 @@ export function createShellState(
|
||||
});
|
||||
}
|
||||
|
||||
export function withCwd(state: ShellState, inode: number): ShellState {
|
||||
export function withCwd(state: ShellState, ptr: NodePointer): ShellState {
|
||||
const session = getCurrentSession(state);
|
||||
|
||||
const newSession = Object.freeze({
|
||||
user: session.user,
|
||||
envVars: Object.freeze(session.envVars),
|
||||
history: Object.freeze(session.history),
|
||||
cwd: inode,
|
||||
cwd: ptr,
|
||||
pwd: session.cwd,
|
||||
exitCode: session.exitCode,
|
||||
} satisfies SessionState);
|
||||
|
||||
Reference in New Issue
Block a user