summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2017-02-03 22:29:18 -0500
committerTodd Leonhardt <todd.leonhardt@gmail.com>2017-02-03 22:29:18 -0500
commitb4379b6cc54f263d2f56128dcbd7cd896c386e74 (patch)
tree58c1bc63920900dbaf39987ff651ec902f605cc9 /tests
parent3a643d42a77f31be4cd3edd9cab7c69ea079b28e (diff)
downloadcmd2-git-b4379b6cc54f263d2f56128dcbd7cd896c386e74.tar.gz
Made argument parsing more backward compatible by default.
Added a global variable BACKWARD_COMPATIBLE_PARSING which defaults to True. If this is set to True, then if shelx.split() throws an exception when splitting up the arguments, it falls back to splitting them up using str.split() instead. If this is False, it "throws" an exception and prints an error message at the console with details on the error. TODO: Figure out a way to make this settable from within the Cmd class, but accessible within the options decorator. I prefer it False for a stricter grammar to help prevent user error. But I imagine there are people who prefer it True for backward compatibility. It exists for now in this "non-settable" hard-coded state because I did not intend to break backward compatibility when fixing the bug related to quoted arguments for which shelx.split() was brought in to deal with.
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions