nebius/SWE-bench-extra huggingface dataset:
Repository: fniessink/next-action

Issue:
next-action -pA isn't interpreted as next-action -p A

Comments:

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bbdd695..eb96b4e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
 and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
 
+## [Unreleased]
+
+### Fixed
+
+- Short options immediately followed by a value weren't parsed correctly. Fixes #84.
+
 ## [0.16.1] - 2018-06-04
 
 ### Fixed
diff --git a/next_action/arguments/parser.py b/next_action/arguments/parser.py
index 725d787..0d7a4b1 100644
--- a/next_action/arguments/parser.py
+++ b/next_action/arguments/parser.py
@@ -153,7 +153,8 @@ class NextActionArgumentParser(argparse.ArgumentParser):
     @staticmethod
     def arguments_not_specified(*arguments: str) -> bool:
         """ Return whether any of the arguments was specified on the command line. """
-        return all([argument not in sys.argv for argument in arguments])
+        return not any([command_line_arg.startswith(argument) for argument in arguments
+                        for command_line_arg in sys.argv])
 
     def fix_filenames(self, namespace: argparse.Namespace) -> None:
         """ Fix the filenames. """


Test patch:
diff --git a/tests/unittests/arguments/test_config.py b/tests/unittests/arguments/test_config.py
index 8eb5728..12e9a15 100644
--- a/tests/unittests/arguments/test_config.py
+++ b/tests/unittests/arguments/test_config.py
@@ -270,13 +270,19 @@ class PriorityTest(ConfigTestCase):
     @patch.object(sys, "argv", ["next-action", "--priority", "M"])
     @patch.object(config, "open", mock_open(read_data="priority: Z"))
     def test_override_priority(self):
-        """ Test that a command line style overrides the priority in the config file. """
+        """ Test that a command line option overrides the priority in the config file. """
+        self.assertEqual("M", parse_arguments()[1].priority)
+
+    @patch.object(sys, "argv", ["next-action", "-pM"])
+    @patch.object(config, "open", mock_open(read_data="priority: Z"))
+    def test_override_short(self):
+        """ Test that a short command line option overrides the priority in the config file. """
         self.assertEqual("M", parse_arguments()[1].priority)
 
     @patch.object(sys, "argv", ["next-action", "--priority"])
     @patch.object(config, "open", mock_open(read_data="priority: Z"))
     def test_cancel_priority(self):
-        """ Test that a command line style overrides the priority in the config file. """
+        """ Test that a command line option overrides the priority in the config file. """
         self.assertEqual(None, parse_arguments()[1].priority)
 
     @patch.object(sys, "argv", ["next-action"])
Repository: fniessink/next-action

Issue:
Add `--reference` to standard configuration file

Comments:

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7db5eed..d3ce3c0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
 The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
 and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
 
+## [Unrelease]
+
+### Fixed
+
+- Include reference parameter into standard configuration file. Fixes #98.
+
 ## [0.16.0] - 2018-06-03
 
 ### Added
diff --git a/next_action/arguments/config.py b/next_action/arguments/config.py
index 243e787..6c6acdc 100644
--- a/next_action/arguments/config.py
+++ b/next_action/arguments/config.py
@@ -29,7 +29,8 @@ def read_config_file(filename: str, default_filename: str, error: Callable[[str]
 def write_config_file() -> None:
     """ Generate a configuration file on standard out. """
     intro = "# Configuration file for Next-action. Edit the settings below as you like.\n"
-    config = yaml.dump(dict(file="~/todo.txt", number=1, style="default"), default_flow_style=False)
+    config = yaml.dump(dict(file="~/todo.txt", number=1, reference="multiple", style="default"),
+                       default_flow_style=False)
     sys.stdout.write(intro + config)
 
 


Test patch:
diff --git a/tests/unittests/arguments/test_config.py b/tests/unittests/arguments/test_config.py
index fcdf588..8eb5728 100644
--- a/tests/unittests/arguments/test_config.py
+++ b/tests/unittests/arguments/test_config.py
@@ -99,7 +99,7 @@ class ConfigFileTest(ConfigTestCase):
         """ Test that a config file can be written to stdout. """
         self.assertRaises(SystemExit, parse_arguments)
         expected = "# Configuration file for Next-action. Edit the settings below as you like.\n"
-        expected += "file: ~/todo.txt\nnumber: 1\nstyle: default\n"
+        expected += "file: ~/todo.txt\nnumber: 1\nreference: multiple\nstyle: default\n"
         self.assertEqual([call(expected)], mock_stdout_write.call_args_list)