sync: Sync now asks user selection by default

Removed --select flag in favor of --all flag
This commit is contained in:
GaspardCulis 2024-01-05 17:27:55 +01:00
parent 794e204891
commit ecad407e19

8
sync
View file

@ -22,9 +22,9 @@ parser = argparse.ArgumentParser(
) )
parser.add_argument("action", choices=["save", "restore"]) parser.add_argument("action", choices=["save", "restore"])
parser.add_argument( parser.add_argument(
"-s", "-a",
"--select", "--all",
help="Select the files and folders to sync", help="Sync all files",
action="store_true", action="store_true",
) )
@ -125,7 +125,7 @@ if __name__ == "__main__":
args = parser.parse_args() args = parser.parse_args()
msg = "" msg = ""
r = list_files(args.action == "save") if args.select else range(len(synced_files)) r = range(len(synced_files)) if args.all else list_files(args.action == "save")
for ri, i in enumerate(r): for ri, i in enumerate(r):
if args.action == "save": if args.action == "save":
save(synced_files[i]) save(synced_files[i])