Proposal: New CLI Behavior #1
Closed
daltonbr
announced in
Announcements
Replies: 1 comment
-
|
This was merged with #2. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Proposal: New CLI Behavior for
open-unityNote
This is just an initial brainstorm I had with an LLM, about my wishes for this nice tool. I revised, and suggestions/changes are welcome.
This document outlines the proposed changes to the command-line interface for the
open-unityscript to incorporate the new feature of opening recent projects.Guiding Principle
The primary goal is to make the most common workflow—opening a recent project—as fast and intuitive as possible, while retaining the original functionality for opening a project from the current directory.
Proposed CLI Design
The script will operate in one of two modes based on the arguments provided.
1. Default Mode: Open Recent Project (No Arguments)
When the script is executed without any arguments, it will be the primary and default behavior.
Action:
projects-v1.jsonfile from Unity Hub's application support directory.lastModifieddate (most recent first).fzfis installed: Usefzfto show a fuzzy-findable list of recent projects. This provides the best user experience.fzfis not installed: Fall back to a simple, numbered list of the top 10 recent projects, prompting the user to enter a number.2. Legacy Mode: Open Project from Current Directory (With Arguments)
When the script is executed with a valid directory path as its first argument, it will trigger the legacy behavior. This path is mandatory to enter this mode. Any additional arguments will be forwarded to the Unity Editor.
Action:
.or/path/to/project).ProjectSettings/ProjectVersion.txtfile directly within that path. The script will no longer search parent or common subdirectories.-force-metal,-batchmode, etc.) are forwarded directly to the Unity Editor executable.-h), the script will default to showing the recent projects list.This design makes opening recent projects the default, most accessible feature, while a simple argument like
.or any Unity flag cleanly switches to the context-sensitive local project opening.Beta Was this translation helpful? Give feedback.
All reactions