You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Avoid mixing dynamic and static elements in the apx commands to reduce confusion.
Recommend standardizing to a command action item format—transition from apx my-subsystem to apx enter my-subsystem and apx subsystems enter my-subsystem.
Propose deprecating direct dynamic access to ensure cleaner, more predictable usage, with proper notices about the deprecation.
This issue is a follow-up to issue #437 on GitHub, which was resolved by preventing users from creating subsystems with names that conflict with internal Apx commands.
It is unexpected for dynamic elements to share the same menu as static elements, as this can lead to confusion. A new user would likely look under apx subsystems to find their subsystems, rather than searching through a mix of existing static elements.
Having dynamic items as the first parameter to a CLI command is typically reserved for single-purpose commands that heavily rely on flags for other purposes, such as ls.
apx is more like git or npm in this regard, where it allows you to perform a lot of different actions in one command.
This feels like looking for a needle in a haystack:
veryloud@apx-vso-pico:~$ apx --help
Apx is a package manager with support for multiple sources, allowing you to install packages in subsystems.
Usage:
apx [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
devel Work with the specified subsystem, accessing the package manager and environment.
help Help about any command
pkgmanagers Work with the package managers that are available in apx.
stacks Work with the stacks that are available in apx.
subsystems Work with the subsystems that are available in apx.
ubuntu-dev Work with the specified subsystem, accessing the package manager and environment.
Flags:
-h, --help Show help for apx.
-v, --version Show version for apx.
Use "apx [command] --help" for more information about a command.
Here's a parallel:
it would be unexpected for Git to allow access to a branch by typing git my-branch-name, as this could conflict with git's internal commands.
Users expect to write their commands in the following format:
command action item
I suggest instead using apx enter my-subsystem, which follows this expected pattern and still provides a shortcut to quickly enter a subsystem, alongside an apx subsystems enter my-subsystem, which puts a command both in the expected location and within a shortcut.
Other examples of commands that follow this pattern include:
apt install package-name
abroot pkg add package-name (where pkg is a sub-command and add is the action)
npm run my-npm-command
And examples that are usually, but not necessarily, typed in this fashion:
ls -la ./folder
rm -rf ./file
This will bring on some backwards-compatibility concerns, so I suggest we:
Keep the existing fix
Deprecate accessing subsystems directly as a root parameter to apx
Mention the feature and its deprecation in the --help menu.
Mention the deprecation in the command line when a subsystem is accessed in this fashion.
The text was updated successfully, but these errors were encountered:
acerspyro
changed the title
Feature: Allow selecting subsystems from the "subsystems" CLI menu
Feature: Deprecate accessing subsystems directly at the root of the apx CLI
Dec 16, 2024
TL;DR:
apx
commands to reduce confusion.action item format
—transition fromapx my-subsystem
toapx enter my-subsystem
andapx subsystems enter my-subsystem
.This issue is a follow-up to issue #437 on GitHub, which was resolved by preventing users from creating subsystems with names that conflict with internal Apx commands.
It is unexpected for dynamic elements to share the same menu as static elements, as this can lead to confusion. A new user would likely look under
apx subsystems
to find their subsystems, rather than searching through a mix of existing static elements.Having dynamic items as the first parameter to a CLI command is typically reserved for single-purpose commands that heavily rely on flags for other purposes, such as
ls
.apx
is more likegit
ornpm
in this regard, where it allows you to perform a lot of different actions in one command.This feels like looking for a needle in a haystack:
Here's a parallel:
it would be unexpected for Git to allow access to a branch by typing
git my-branch-name
, as this could conflict with git's internal commands.Users expect to write their commands in the following format:
command action item
I suggest instead using
apx enter my-subsystem
, which follows this expected pattern and still provides a shortcut to quickly enter a subsystem, alongside anapx subsystems enter my-subsystem
, which puts a command both in the expected location and within a shortcut.Other examples of commands that follow this pattern include:
apt install package-name
abroot pkg add package-name
(wherepkg
is a sub-command andadd
is the action)npm run my-npm-command
And examples that are usually, but not necessarily, typed in this fashion:
ls -la ./folder
rm -rf ./file
This will bring on some backwards-compatibility concerns, so I suggest we:
apx
The text was updated successfully, but these errors were encountered: