@@ -48,8 +48,10 @@ $cmds->{editor}->{run} = "editor '%s'";
## ''' ## # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
if (exists $bangs->{$type}) {
- -e $name and not $force
- or mkexec $name, mkbody($type);
+ $force and -e $name
+ and (defined `cp "$name" "$name~"` or die $!);
+ (not -e $name or $force)
+ and mkexec $name, mkbody($type);
chmod $DEFAULT_MODE, $name;
launch_editor $name;
} else {