sync: Sync now asks user selection by default
Removed --select flag in favor of --all flag
This commit is contained in:
parent
794e204891
commit
ecad407e19
1 changed files with 4 additions and 4 deletions
8
sync
8
sync
|
@ -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])
|
||||||
|
|
Loading…
Reference in a new issue