diff --git a/bin/cat.ts b/bin/cat.ts index 47b8d3c..08bd160 100644 --- a/bin/cat.ts +++ b/bin/cat.ts @@ -6,12 +6,11 @@ import { join, extname } from "path" import type { CommandOutput } from "@/shared/types" import { isBinaryFile } from "@/utils" -import { projectName, projectDir } from "@/project" +import { projectDir } from "@/project" import { sessionGet } from "@/session" import { highlight } from "../lib/highlight" export default async function (path: string) { - const project = projectName() const root = sessionGet("cwd") || projectDir() let files: string[] = [] diff --git a/bin/edit.tsx b/bin/edit.tsx index 2c2b8a8..707745d 100644 --- a/bin/edit.tsx +++ b/bin/edit.tsx @@ -10,7 +10,6 @@ import { projectName, projectDir } from "@/project" import { sessionGet } from "@/session" export default async function (path: string) { - const project = projectName() const root = sessionGet("cwd") || projectDir() let files: string[] = [] diff --git a/bin/ls.tsx b/bin/ls.tsx index add7a76..9d68969 100644 --- a/bin/ls.tsx +++ b/bin/ls.tsx @@ -1,7 +1,7 @@ // Look around. import { readdirSync } from "fs" -import { projectName, projectDir } from "@/project" +import { projectDir } from "@/project" import { sessionGet } from "@/session" export default function () { diff --git a/src/project.ts b/src/project.ts index 3ce6d87..8ee494d 100644 --- a/src/project.ts +++ b/src/project.ts @@ -29,7 +29,7 @@ export function projectDir(name = projectName()): string { } export function projectBin(name = projectName()): string { - return join(projectDir(), "bin") + return join(projectDir(name), "bin") } export function projectFiles(name = projectName()): Dirent[] {