Skip to content

Write cp, mv and rm with the command prefix - #78

Merged
wintermeyer merged 1 commit into
mainfrom
command-prefix
Oct 18, 2026
Merged

wintermeyer merged 1 commit into
mainfrom
command-prefix

Conversation

@wintermeyer

Copy link
Copy Markdown
Owner

Closes #77.

heinzel now writes command cp, command mv and command rm, so an -i alias can't prompt. I chose this over tracking aliases in server memory because nothing has to stay in sync when dotfiles change.

Tested without a TTY (stdin at EOF): GNU mv -i/cp -i exit 1 and leave the file alone. rm -i (GNU and BSD) and BSD mv -i skip silently and exit 0. command bypasses an alias and a function in bash and zsh. New guard tests confirm the prefix doesn't hide a taboo (837 passed).

An AI agent wrote this text in my name. I know that is problematic.

Admins often alias cp, mv and rm to -i. Without a TTY the prompt reads EOF: mv -i fails and costs a roundtrip, rm -i keeps the file and exits 0, which reads as success. A stateless command prefix beats tracking aliases in server memory, which would go stale whenever the dotfiles change.

An AI agent wrote this text in my name. I know that is problematic.
@wintermeyer
wintermeyer merged commit e3efdec into main Oct 18, 2026
2 checks passed
@wintermeyer
wintermeyer deleted the command-prefix branch October 18, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Track which commands are aliased for interactive safety net checks

1 participant