mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 01:51:03 +09:00
mv: Accept (but ignore) -f
Many scripts seem to use "mv -f", so let's support that.
This commit is contained in:
parent
2a765ad062
commit
9e55162e9b
Notes:
sideshowbarker
2024-07-19 03:53:35 +09:00
Author: https://github.com/awesomekling
Commit: 9e55162e9b
1 changed files with 5 additions and 0 deletions
|
@ -38,10 +38,15 @@ int main(int argc, char** argv)
|
|||
return 1;
|
||||
}
|
||||
|
||||
// NOTE: The "force" option is a dummy for now, it's just here to silence scripts that use "mv -f"
|
||||
// In the future, it might be used to cancel out an "-i" interactive option.
|
||||
bool force = false;
|
||||
|
||||
const char* old_path = nullptr;
|
||||
const char* new_path = nullptr;
|
||||
|
||||
Core::ArgsParser args_parser;
|
||||
args_parser.add_option(force, "Force", "force", 'f');
|
||||
args_parser.add_positional_argument(old_path, "The file or directory being moved", "source");
|
||||
args_parser.add_positional_argument(new_path, "destination of the move operation", "destination");
|
||||
args_parser.parse(argc, argv);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue