Skip to content

Add persistent terminal aliases - #33

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/terminal-emulation-feature-0788
Draft

Add persistent terminal aliases#33
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/terminal-emulation-feature-0788

Conversation

@cursor

@cursor cursor Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Issue

Problem

The site is moving toward stronger terminal emulation, but the advertised alias command only printed a hard-coded stub (alias exit='close'). Visitors could not create real shortcuts, persist shell-like preferences, or remove them later.

Proposed improvement

Add persistent, shell-style aliases to the terminal runtime:

  • alias h='history 3' creates a shortcut.
  • h expands to the saved command, preserving extra arguments.
  • alias lists built-in and custom aliases.
  • unalias h removes a custom alias.
  • Custom aliases persist in browser localStorage across reloads.
  • Expansion detects recursive alias loops instead of hanging.

Acceptance criteria

  • Users can create, list, execute, persist, and remove aliases from the terminal UI.
  • Built-in aliases such as exit='close' remain read-only.
  • Alias helpers have unit coverage for parsing, formatting, expansion, nested expansion, and loop detection.
  • README documents the new terminal alias workflow.

Implementation

  • Added alias helper functions in src/lib/terminal/index.js.
  • Wired alias state and expansion into src/scripts/terminal.js, including pipeline support.
  • Added the unalias command to command lists, help output, and man-page metadata.
  • Documented usage examples in README.md.

Testing

  • Pre-push hook ran npm run check successfully:
    • ESLint passed.
    • Prettier format check passed.
    • Vitest coverage passed: 2 test files, 69 tests.
    • Astro production build passed.
  • Manual browser walkthrough recorded and reviewed: create alias, execute it, reload to verify persistence, list aliases, remove alias, confirm removed alias is no longer found.
Open in Web View Automation 

Co-authored-by: Jakob Langtry <jjalangtry@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant