Skip to content

cp

Usage
cp [args...]

Wraps cp so it asks before overwriting: it passes -i, as the old cp -i alias in conf.d/tricks.fish did. A flag you pass after it, such as -f or -n, still wins.

It is a function rather than an alias because an alias is itself a function named cp and would shadow this one.

Opinionated component (C1): when disabled via __fish_config_op_aliases or its aliases/filesystem sub-category (__fish_config_op_aliases_filesystem), behaves exactly like bare command cp, with no -i.

args... Arguments forwarded to standard cp

Standard cp exit status.

Terminal window
cp notes.txt notes.bak

Classification: bypasses-shadow(cp)