-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add config for easier command line usage #2
Conversation
parser.add_argument('--remote_dir', help='the remote directory you want to sync', required=True) | ||
parser.add_argument('--target', help='specify which remote machine to connect to', required=True) | ||
parser.add_argument('project', nargs='?', default=None) | ||
parser.add_argument('--register', help='Register a new project to code_sync', required=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could add at parser.add_argument('--register'
: , action='store_true'
and in this way, the check could be just if args.register
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason I did it the way I have it is so that you call code_sync -- register <project name>
and that starts registering the <project name>
project. Do you think it is a better interface to instead to code_sync --register
and then code_sync asks for the name of the project?
Hi @togop- Would you like to respond to my replies to your comments, or should I go ahead and merge this as is? |
You can now run:
code_sync --register <project>
# prompts for configuration and saves to config filecode_sync <project>
code_sync --list
# lists registered projectsYou can also still run
code_sync
the old way, specifying the local_dir, remote_dir, etc manually.