[v0.1/SSH Review] --host フラグ名と URI/destination 表記の不一致 #37
Labels
No labels
priority/P0
priority/P1
priority/P2
release/v0.1.0
status/blocked
status/planned
type/bug
type/design
type/test-gap
type/tracker
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis#37
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
現状
--host <user@host>だが、実際はsshが受理する任意の文字列を verbatim で渡す。user@host/~/.ssh/configalias /ssh://user@host:portURI のいずれも受理する(cli.md"Local or remote, same verbs")。destinationと命名されている:Carrier::Ssh { destination }/RetargetCarrier::Ssh { destination }/felis.proto: SshEndpoint.destination。CLI help もDESTINATIONと表記(felis ssh <DESTINATION>)。--hostという名前は URI を渡したときに嘘になる(host ではなく URI)。--socketがパスであるのに対し、--hostは「SSH が解釈する宛先」を意味しており、対称性がない。window retargetでは同一概念が--hostとして再登場しつつ、felis sshalias では positionalDESTINATIONになる。三箇所で同一値に三つの呼び方。reserved "host", "ssh_args", "socket"とあるように、過去の bag-of-optionals からの改名残滓が schema に残っている。問い(1.0 でしか変えられない)
--hostをこのまま凍結するか? 名前をdestination/remote/ssh-target等の正確な語に直すか?破壊的変更案
--hostを--remote(または--ssh-destination) にリネームし、--hostは v0.1 のみ deprecated alias として残す。 proto/doc/CLI help のdestinationと統一。--ssh-argも合わせて--ssh-opt/--ssh-argのどちらに寄せるかを決める。--hostは短く覚えやすく、scp/sshの慣用に合わせたという rationale をcontrol-surfaces.mdに追記して凍結。判定基準
felis --help/felis ssh --help/felis window retarget --helpを並べて読んだとき、三つの carrier 指定(--host/--to-socket/default)が同一語彙で説明できること。reference/cli.md/reference/ipc.md/proto/crates/.../messages.rsの命名が一致していること(現状hostvsdestinationの乖離を解消)。~/.ssh/configユーザが--host myaliasを直感で打てること(--remoteでもこれは満たす)。対象ファイル
crates/felis-cli/src/main.rs(Cli::host),crates/felis-client/src/main.rs,crates/felis-client-core/src/connector.rs,crates/felis-protocol/proto/felis.proto,docs/reference/cli.md,docs/reference/ipc.md,docs/how-to/attach-over-ssh.md参考
just check/just schema相当の help/completions/man も同時更新。cc @natsukium
Triaged as duplicate of #23. That issue already owns the breaking carrier-language decision (
--to-host/--to-socket, removal offelis ssh) and its help, completion, manual, schema, skill, and changelog cascade. Keeping a second implementation issue would split one CLI grammar decision across two acceptance lists.