Skip to content

Add persistent terminal aliases - #34

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

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

Conversation

@cursor

@cursor cursor Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Added persistent shell-style terminal aliases with alias, unalias, which, tab completion, and localStorage persistence.
  • Expanded aliases before command execution, including aliases with arguments and pipeline aliases like h | grep repo.
  • Documented the workflow in the README and terminal help/man entries.

Issue

Title

Add persistent terminal aliases to improve terminal emulation

Problem

The terminal exposed an alias command, but it only printed a static placeholder and did not behave like a real shell. Visitors could not create shortcuts for common commands, inspect aliases, persist them across reloads, or remove them.

Proposed improvement

Implement a focused alias system that supports alias name='command', alias, alias name, unalias name, unalias -a, alias-aware which, command-name tab completion, and loop-safe expansion before normal command and pipeline execution.

Acceptance criteria

  • Users can create, list, inspect, and remove aliases from the terminal.
  • Aliases persist across page reloads using browser localStorage.
  • Aliases expand before executing normal commands and pipeline segments.
  • Alias loops are detected and reported without hanging the terminal.
  • Unit tests cover parsing, formatting, expansion, and loop detection.

Testing

  • pnpm check passed via pre-push hook (lint, format check, coverage, build): 70 tests passed, branch coverage 85.26%.
  • Manual browser walkthrough passed: created an alias, verified which, reloaded to confirm persistence, ran pipeline and argument aliases, listed aliases, removed one, and confirmed it no longer executed.

Walkthrough artifact

  • /opt/cursor/artifacts/persistent_terminal_aliases_walkthrough.mp4
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