Command aliases (L→LINE, CC→COPYCLIP) were scattered across dispatch match arms and CommandRegistration name arrays. Move them all into a single user-editable file: - assets/ocad.pgp: shipped default alias table (ALIAS,*COMMAND format), embedded and copied to config/ocad.pgp on first launch; only that user copy is read after. AA→AREA default closes #286. - resolve_alias() rewrites the leading command token at the top of dispatch_command_inner, so aliases resolve for every path (families, plugins, Repeat menu). Args after the first space are untouched. - Autocomplete hides alias keys and, when the whole input is an alias, surfaces its target command as the top (highlighted) suggestion so the highlight matches what Enter runs (AA→AREA, L→LINE). - ALIASEDIT opens a new editor modal (add/edit/delete rows) with an Apply button; Apply persists to ocad.pgp, closing discards unapplied edits. - Strip alias tokens from all 8 dispatch match-arm files and 71 module CommandRegistration arrays, keeping canonical/synonym/distinct-command names. ocad.pgp is now the sole source: deleting or remapping an alias there takes effect. CUI stays on the keyboard-shortcut panel. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
124 lines
3.9 KiB
Text
124 lines
3.9 KiB
Text
; OpenCADStudio command aliases.
|
|
; Format: ALIAS,*COMMAND (lines starting with ';' are comments)
|
|
; Edit here or via the ALIASEDIT command. One alias per line.
|
|
;
|
|
; This file is the single source of truth for command-line aliases. It is
|
|
; copied to your user config folder on first launch; edit that copy (or use
|
|
; ALIASEDIT) to add, remap, or remove aliases.
|
|
|
|
; ── Draw ──────────────────────────────────────────────────────────────────
|
|
L, *LINE
|
|
ML, *MLINE
|
|
PL, *PLINE
|
|
A, *ARC
|
|
C, *CIRCLE
|
|
DO, *DONUT
|
|
EL, *ELLIPSE
|
|
PO, *POINT
|
|
SPL, *SPLINE
|
|
H, *HATCH
|
|
HE, *HATCHEDIT
|
|
XL, *XLINE
|
|
POL, *POLYGON
|
|
REC, *RECT
|
|
SO, *SOLID
|
|
WO, *WIPEOUT
|
|
|
|
; ── Modify ────────────────────────────────────────────────────────────────
|
|
M, *MOVE
|
|
CO, *COPY
|
|
RO, *ROTATE
|
|
SC, *SCALE
|
|
MI, *MIRROR
|
|
E, *ERASE
|
|
X, *EXPLODE
|
|
SS, *STRETCH
|
|
O, *OFFSET
|
|
TR, *TRIM
|
|
EX, *EXTEND
|
|
F, *FILLET
|
|
CHA, *CHAMFER
|
|
J, *JOIN
|
|
BR, *BREAK
|
|
BAP, *BREAKATPOINT
|
|
PE, *PEDIT
|
|
SPE, *SPLINEDIT
|
|
LEN, *LENGTHEN
|
|
AL, *ALIGN
|
|
AR, *ARRAY
|
|
MA, *MATCHPROP
|
|
ATE, *ATTEDIT
|
|
|
|
; ── Clipboard ─────────────────────────────────────────────────────────────
|
|
CC, *COPYCLIP
|
|
CX, *CUTCLIP
|
|
PC, *PASTECLIP
|
|
|
|
; ── Blocks / references ───────────────────────────────────────────────────
|
|
XA, *XATTACH
|
|
XR, *XREF
|
|
ADC, *ADCENTER
|
|
|
|
; ── Layers / groups ───────────────────────────────────────────────────────
|
|
LA, *LAYERS
|
|
G, *GROUP
|
|
UG, *UNGROUP
|
|
|
|
; ── Dimensions / annotation ───────────────────────────────────────────────
|
|
DAL, *DIMALIGNED
|
|
DAN, *DIMANGULAR
|
|
DDI, *DIMDIAMETER
|
|
DLI, *DIMLINEAR
|
|
DRA, *DIMRADIUS
|
|
DOR, *DIMORDINATE
|
|
DBA, *DIMBASELINE
|
|
DCO, *DIMCONTINUE
|
|
DED, *DIMEDIT
|
|
DBR, *DIMBREAK
|
|
DJL, *DIMJOGLINE
|
|
DJO, *DIMJOGGED
|
|
DCE, *DIMCENTER
|
|
LE, *LEADER
|
|
QL, *QLEADER
|
|
MLD, *MLEADER
|
|
MLA, *MLEADERADD
|
|
MLR, *MLEADERREMOVE
|
|
MLAL, *MLEADERALIGN
|
|
MLC, *MLEADERCOLLECT
|
|
MT, *MTEXT
|
|
DT, *TEXT
|
|
T, *TEXT
|
|
ED, *DDEDIT
|
|
TOL, *TOLERANCE
|
|
|
|
; ── Inquiry / selection ───────────────────────────────────────────────────
|
|
AA, *AREA
|
|
DI, *DIST
|
|
DIV, *DIVIDE
|
|
ME, *MEASURE
|
|
MEA, *MEASUREGEOM
|
|
LI, *LIST
|
|
SA, *SELECTALL
|
|
DE, *DESELECT
|
|
QS, *QSELECT
|
|
FI, *FILTER
|
|
|
|
; ── View / display ────────────────────────────────────────────────────────
|
|
P, *PAN
|
|
U, *UNDO
|
|
PR, *PROPERTIES
|
|
UN, *UNITS
|
|
TP, *TOOLPALETTES
|
|
SSM, *SHEETSET
|
|
VW, *WIREFRAME
|
|
HI, *HIDE
|
|
3O, *3DORBIT
|
|
MV, *MVIEW
|
|
MS, *MSPACE
|
|
PW, *PLOTWINDOW
|
|
QP, *QUICKPRINT
|
|
|
|
; ── 3D solids ─────────────────────────────────────────────────────────────
|
|
EXT, *EXTRUDE
|
|
REV, *REVOLVE
|
|
INF, *INTERFERE
|