Skip to content

Handle open file with "Open With" os option #74

@mkh-user

Description

@mkh-user

Feature Summary

Enable the application to handle files opened via the operating system's "Open With" option. When a user right-clicks a file and selects "Open With Text Forge," the file should open directly in the editor.

Motivation

Users often want to open files directly from their file explorer or desktop environment. Without support for "Open With," they must manually launch the app and then locate the file. This feature improves convenience, integrates Text Forge more naturally into the OS, and streamlines workflows.

Proposed Design

  • Register Text Forge as a handler for supported file types in the OS.
  • Ensure the application can receive and process file paths passed via command-line or OS-level invocation.
  • On launch, detect if a file path was passed and open it automatically in the editor.
  • Support multiple files if selected together.

Acceptance Criteria

  • Text Forge appears in the "Open With" menu for supported file types.
  • Files opened via OS are loaded correctly in the editor.
  • Multiple files can be opened simultaneously.
  • Behavior is consistent across platforms (Windows and Linux).
  • No interference with normal launch behavior when no file is passed.

Related Issues / Discussions

Nothing

Implementation Notes (Optional)

  • Use platform-specific registration methods (e.g., .desktop files on Linux, registry entries on Windows).
  • Ensure CLI entry point supports file path arguments.
  • Consider security implications of opening external files.

Localization & Accessibility

  • Localize any error messages or prompts related to file opening.
  • Ensure fallback behavior is accessible if file cannot be opened.

Community Feedback (Optional)

Nothing

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

Completed

Relationships

None yet

Development

No branches or pull requests

Issue actions