XcodesOrg / xcodes

The best command-line tool to install and switch between multiple versions of Xcode.
MIT License
3.74k stars 130 forks source link

Feature request: Select the version specified by the .xcode-version by default #235

Closed daltonclaybrook closed 1 year ago

daltonclaybrook commented 1 year ago

When running xcodes install with no arguments, xcodes will attempt to determine the correct version to install by reading the .xcode-version file in the current directory. I believe that this should be the behavior when running xcodes select without any arguments as well. When running this command today, the user is prompted with a list of installed Xcode versions. I believe this prompt should be bypassed if an .xcode-version file is found. To preserve the old functionality, a new flag could be added like xcodes select --prompt (for example). I realize that this change in behavior could be disruptive for people who are very familiar with the tool, so as an alternative, I could also support a flag like xcodes select --file (for example) that would look for the file and fail automatically if the file isn't found.