Skip to content

SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]

Added support for files whose paths have a space in the name (#759)

Phillip Demro55fec0711ec4
diff --git a/config/coding_challenge.yaml b/config/coding_challenge.yaml
index f8344c62..9719359c 100644
--- a/config/coding_challenge.yaml
+++ b/config/coding_challenge.yaml
@@ -84,10 +84,10 @@ state_command:
code: |
state() {
local working_dir="$PWD";
- if [ -z $CURRENT_FILE ]; then
+ if [ -z "$CURRENT_FILE" ]; then
echo '{"open_file": "n/a", "working_dir": "'$working_dir'"}';
else
- echo '{"open_file": "'$(realpath $CURRENT_FILE)'", "working_dir": "'$working_dir'"}';
+ echo '{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}';
fi
};
parse_function: ThoughtActionParser
@@ -95,16 +95,16 @@ env_variables:
WINDOW: 100
OVERLAP: 2
CURRENT_LINE: 0
- CURRENT_FILE: ''
+ CURRENT_FILE: ""
SEARCH_RESULTS: ()
SEARCH_FILES: ()
SEARCH_INDEX: 0
command_files:
-- config/commands/defaults.sh
-- config/commands/search.sh
-- config/commands/edit_linting.sh
-- config/commands/_split_string.py
+ - config/commands/defaults.sh
+ - config/commands/search.sh
+ - config/commands/edit_linting.sh
+ - config/commands/_split_string.py
parse_command: ParseCommandDetailed
history_processor: Last5Observations
demonstrations:
-- trajectories/demonstrations/human_thought__swe-bench-HumanEvalFix-python__lcb__t-0.00__p-0.95__c-4.00__install-0/humanevalfix-python-0.traj
+ - trajectories/demonstrations/human_thought__swe-bench-HumanEvalFix-python__lcb__t-0.00__p-0.95__c-4.00__install-0/humanevalfix-python-0.traj
diff --git a/config/commands/defaults.sh b/config/commands/defaults.sh
index b4e9f45b..894bba2e 100644
--- a/config/commands/defaults.sh
+++ b/config/commands/defaults.sh
@@ -1,12 +1,12 @@
_print() {
- local total_lines=$(awk 'END {print NR}' $CURRENT_FILE)
- echo "[File: $(realpath $CURRENT_FILE) ($total_lines lines total)]"
+ local total_lines=$(awk 'END {print NR}' "$CURRENT_FILE")
+ echo "[File: $(realpath "$CURRENT_FILE") ($total_lines lines total)]"
lines_above=$(jq -n "$CURRENT_LINE - $WINDOW/2" | jq '[0, .] | max | floor')
lines_below=$(jq -n "$total_lines - $CURRENT_LINE - $WINDOW/2" | jq '[0, .] | max | round')
if [ $lines_above -gt 0 ]; then
echo "($lines_above more lines above)"
fi
- cat $CURRENT_FILE | grep -n $ | head -n $(jq -n "[$CURRENT_LINE + $WINDOW/2, $WINDOW/2] | max | floor") | tail -n $(jq -n "$WINDOW")
+ cat "$CURRENT_FILE" | grep -n $ | head -n $(jq -n "[$CURRENT_LINE + $WINDOW/2, $WINDOW/2] | max | floor") | tail -n $(jq -n "$WINDOW")
if [ $lines_below -gt 0 ]; then
echo "($lines_below more lines below)"
fi
@@ -18,14 +18,14 @@ _constrain_line() {
echo "No file open. Use the open command first."
return
fi
- local max_line=$(awk 'END {print NR}' $CURRENT_FILE)
+ local max_line=$(awk 'END {print NR}' "$CURRENT_FILE")
local half_window=$(jq -n "$WINDOW/2" | jq 'floor')
export CURRENT_LINE=$(jq -n "[$CURRENT_LINE, $max_line - $half_window] | min")
export CURRENT_LINE=$(jq -n "[$CURRENT_LINE, $half_window] | max")
}
# @yaml
-# signature: open <path> [<line_number>]
+# signature: open "<path>" [<line_number>]
# docstring: opens the file at the given path in the editor. If line_number is provided, the window will be move to include that line
# arguments:
# path:
@@ -39,14 +39,14 @@ _constrain_line() {
open() {
if [ -z "$1" ]
then
- echo "Usage: open <file>"
+ echo "Usage: open \"<file>\""
return
fi
# Check if the second argument is provided
if [ -n "$2" ]; then
# Check if the provided argument is a valid number
if ! [[ $2 =~ ^[0-9]+$ ]]; then
- echo "Usage: open <file> [<line_number>]"
+ echo "Usage: open \"<file>\" [<line_number>]"
echo "Error: <line_number> must be a number"
return # Exit if the line number is not valid
fi
@@ -68,7 +68,7 @@ open() {
fi
if [ -f "$1" ]; then
- export CURRENT_FILE=$(realpath $1)
+ export CURRENT_FILE=$(realpath "$1")
export CURRENT_LINE=$line_number
_constrain_line
_print
@@ -108,7 +108,7 @@ goto() {
echo "Error: <line> must be a number"
return
fi
- local max_line=$(awk 'END {print NR}' $CURRENT_FILE)
+ local max_line=$(awk 'END {print NR}' "$CURRENT_FILE")
if [ $1 -gt $max_line ]
then
echo "Error: <line> must be less than or equal to $max_line"
diff --git a/config/configs/default_sys-env_cursors_window100-detailed_cmd_format-full_history-1_demos.yaml b/config/configs/default_sys-env_cursors_window100-detailed_cmd_format-full_history-1_demos.yaml
index 549f4aab..8d18dd5d 100644
--- a/config/configs/default_sys-env_cursors_window100-detailed_cmd_format-full_history-1_demos.yaml
+++ b/config/configs/default_sys-env_cursors_window100-detailed_cmd_format-full_history-1_demos.yaml
@@ -85,10 +85,10 @@ state_command:
code: |
state() {
local working_dir="$PWD";
- if [ -z $CURRENT_FILE ]; then
+ if [ -z "$CURRENT_FILE" ]; then
echo '{"open_file": "n/a", "working_dir": "'$working_dir'"}';
else
- echo '{"open_file": "'$(realpath $CURRENT_FILE)'", "working_dir": "'$working_dir'"}';
+ echo '{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}';
fi
};
parse_function: ThoughtActionParser
@@ -96,7 +96,7 @@ env_variables:
WINDOW: 200
OVERLAP: 2
CURRENT_LINE: 0
- CURRENT_FILE: ''
+ CURRENT_FILE: ""
SEARCH_RESULTS: ()
SEARCH_FILES: ()
SEARCH_INDEX: 0
@@ -104,14 +104,14 @@ env_variables:
END_INDEX: 0
START_CURSOR: 0
END_CURSOR: 0
- START_CURSOR_MARK: '"<<<<< START CURSOR >>>>>"' # these have to use double quotes
+ START_CURSOR_MARK: '"<<<<< START CURSOR >>>>>"' # these have to use double quotes
END_CURSOR_MARK: '"<<<<< END CURSOR >>>>>"' # these have to use double quotes
command_files:
-- config/commands/cursors_defaults.sh
-- config/commands/cursors_edit_linting.sh
-- config/commands/search.sh
-- config/commands/_split_string.py
+ - config/commands/cursors_defaults.sh
+ - config/commands/cursors_edit_linting.sh
+ - config/commands/search.sh
+ - config/commands/_split_string.py
parse_command: ParseCommandDetailed
history_processor: DefaultHistoryProcessor
demonstrations:
-- trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__default_sys-env_cursors_window100__t-0.20__p-0.95__c-2.00__install-1/marshmallow-code__marshmallow-1867.traj
+ - trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__default_sys-env_cursors_window100__t-0.20__p-0.95__c-2.00__install-1/marshmallow-code__marshmallow-1867.traj
diff --git a/config/configs/default_sys-env_cursors_window100-detailed_cmd_format-last_5_history-1_demos.yaml b/config/configs/default_sys-env_cursors_window100-detailed_cmd_format-last_5_history-1_demos.yaml
index 72537d68..3fadfaea 100644
--- a/config/configs/default_sys-env_cursors_window100-detailed_cmd_format-last_5_history-1_demos.yaml
+++ b/config/configs/default_sys-env_cursors_window100-detailed_cmd_format-last_5_history-1_demos.yaml
@@ -85,10 +85,10 @@ state_command:
code: |
state() {
local working_dir="$PWD";
- if [ -z $CURRENT_FILE ]; then
+ if [ -z "$CURRENT_FILE" ]; then
echo '{"open_file": "n/a", "working_dir": "'$working_dir'"}';
else
- echo '{"open_file": "'$(realpath $CURRENT_FILE)'", "working_dir": "'$working_dir'"}';
+ echo '{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}';
fi
};
parse_function: ThoughtActionParser
@@ -96,7 +96,7 @@ env_variables:
WINDOW: 200
OVERLAP: 2
CURRENT_LINE: 0
- CURRENT_FILE: ''
+ CURRENT_FILE: ""
SEARCH_RESULTS: ()
SEARCH_FILES: ()
SEARCH_INDEX: 0
@@ -104,14 +104,14 @@ env_variables:
END_INDEX: 0
START_CURSOR: 0
END_CURSOR: 0
- START_CURSOR_MARK: '"<<<<< START CURSOR >>>>>"' # these have to use double quotes
+ START_CURSOR_MARK: '"<<<<< START CURSOR >>>>>"' # these have to use double quotes
END_CURSOR_MARK: '"<<<<< END CURSOR >>>>>"' # these have to use double quotes
command_files:
-- config/commands/cursors_defaults.sh
-- config/commands/cursors_edit_linting.sh
-- config/commands/search.sh
-- config/commands/_split_string.py
+ - config/commands/cursors_defaults.sh
+ - config/commands/cursors_edit_linting.sh
+ - config/commands/search.sh
+ - config/commands/_split_string.py
parse_command: ParseCommandDetailed
history_processor: Last5Observations
demonstrations:
-- trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__default_sys-env_cursors_window100__t-0.20__p-0.95__c-2.00__install-1/marshmallow-code__marshmallow-1867.traj
+ - trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__default_sys-env_cursors_window100__t-0.20__p-0.95__c-2.00__install-1/marshmallow-code__marshmallow-1867.traj
diff --git a/config/configs/default_sys-env_window100-detailed_cmd_format-full_history-1_demos.yaml b/config/configs/default_sys-env_window100-detailed_cmd_format-full_history-1_demos.yaml
index 33a2edc1..e44384aa 100644
--- a/config/configs/default_sys-env_window100-detailed_cmd_format-full_history-1_demos.yaml
+++ b/config/configs/default_sys-env_window100-detailed_cmd_format-full_history-1_demos.yaml
@@ -84,10 +84,10 @@ state_command:
code: |
state() {
local working_dir="$PWD";
- if [ -z $CURRENT_FILE ]; then
+ if [ -z "$CURRENT_FILE" ]; then
echo '{"open_file": "n/a", "working_dir": "'$working_dir'"}';
else
- echo '{"open_file": "'$(realpath $CURRENT_FILE)'", "working_dir": "'$working_dir'"}';
+ echo '{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}';
fi
};
parse_function: ThoughtActionParser
@@ -95,16 +95,16 @@ env_variables:
WINDOW: 100
OVERLAP: 2
CURRENT_LINE: 0
- CURRENT_FILE: ''
+ CURRENT_FILE: ""
SEARCH_RESULTS: ()
SEARCH_FILES: ()
SEARCH_INDEX: 0
command_files:
-- config/commands/defaults.sh
-- config/commands/search.sh
-- config/commands/edit_linting.sh
-- config/commands/_split_string.py
+ - config/commands/defaults.sh
+ - config/commands/search.sh
+ - config/commands/edit_linting.sh
+ - config/commands/_split_string.py
parse_command: ParseCommandDetailed
history_processor: DefaultHistoryProcessor
demonstrations:
-- trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__default_sys-env_window100__t-0.20__p-0.95__c-2.00__install-1/marshmallow-code__marshmallow-1867.traj
+ - trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__default_sys-env_window100__t-0.20__p-0.95__c-2.00__install-1/marshmallow-code__marshmallow-1867.traj
diff --git a/config/configs/default_sys-env_window100-detailed_cmd_format-last_5_history-1_demos.yaml b/config/configs/default_sys-env_window100-detailed_cmd_format-last_5_history-1_demos.yaml
index 7954b2a1..1dcc6e1c 100644
--- a/config/configs/default_sys-env_window100-detailed_cmd_format-last_5_history-1_demos.yaml
+++ b/config/configs/default_sys-env_window100-detailed_cmd_format-last_5_history-1_demos.yaml
@@ -84,10 +84,10 @@ state_command:
code: |
state() {
local working_dir="$PWD";
- if [ -z $CURRENT_FILE ]; then
+ if [ -z "$CURRENT_FILE" ]; then
echo '{"open_file": "n/a", "working_dir": "'$working_dir'"}';
else
- echo '{"open_file": "'$(realpath $CURRENT_FILE)'", "working_dir": "'$working_dir'"}';
+ echo '{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}';
fi
};
parse_function: ThoughtActionParser
@@ -95,16 +95,16 @@ env_variables:
WINDOW: 100
OVERLAP: 2
CURRENT_LINE: 0
- CURRENT_FILE: ''
+ CURRENT_FILE: ""
SEARCH_RESULTS: ()
SEARCH_FILES: ()
SEARCH_INDEX: 0
command_files:
-- config/commands/defaults.sh
-- config/commands/search.sh
-- config/commands/edit_linting.sh
-- config/commands/_split_string.py
+ - config/commands/defaults.sh
+ - config/commands/search.sh
+ - config/commands/edit_linting.sh
+ - config/commands/_split_string.py
parse_command: ParseCommandDetailed
history_processor: Last5Observations
demonstrations:
-- trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__default_sys-env_window100__t-0.20__p-0.95__c-2.00__install-1/marshmallow-code__marshmallow-1867.traj
+ - trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__default_sys-env_window100__t-0.20__p-0.95__c-2.00__install-1/marshmallow-code__marshmallow-1867.traj
diff --git a/config/configs/xml_sys-env_cursors_window100-detailed_cmd_format-full_history-1_demos.yaml b/config/configs/xml_sys-env_cursors_window100-detailed_cmd_format-full_history-1_demos.yaml
index fe094f0c..9a60e23e 100644
--- a/config/configs/xml_sys-env_cursors_window100-detailed_cmd_format-full_history-1_demos.yaml
+++ b/config/configs/xml_sys-env_cursors_window100-detailed_cmd_format-full_history-1_demos.yaml
@@ -79,10 +79,10 @@ state_command:
code: |
state() {
local working_dir="$PWD";
- if [ -z $CURRENT_FILE ]; then
+ if [ -z "$CURRENT_FILE" ]; then
echo '{"open_file": "n/a", "working_dir": "'$working_dir'"}';
else
- echo '{"open_file": "'$(realpath $CURRENT_FILE)'", "working_dir": "'$working_dir'"}';
+ echo '{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}';
fi
};
parse_function: XMLThoughtActionParser
@@ -90,7 +90,7 @@ env_variables:
WINDOW: 200
OVERLAP: 2
CURRENT_LINE: 0
- CURRENT_FILE: ''
+ CURRENT_FILE: ""
SEARCH_RESULTS: ()
SEARCH_FILES: ()
SEARCH_INDEX: 0
@@ -98,14 +98,14 @@ env_variables:
END_INDEX: 0
START_CURSOR: 0
END_CURSOR: 0
- START_CURSOR_MARK: '"<<<<< START CURSOR >>>>>"' # these have to use double quotes
+ START_CURSOR_MARK: '"<<<<< START CURSOR >>>>>"' # these have to use double quotes
END_CURSOR_MARK: '"<<<<< END CURSOR >>>>>"' # these have to use double quotes
command_files:
-- config/commands/cursors_defaults.sh
-- config/commands/cursors_edit_linting.sh
-- config/commands/search.sh
-- config/commands/_split_string.py
+ - config/commands/cursors_defaults.sh
+ - config/commands/cursors_edit_linting.sh
+ - config/commands/search.sh
+ - config/commands/_split_string.py
parse_command: ParseCommandDetailed
history_processor: DefaultHistoryProcessor
demonstrations:
-- trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__xml_sys-env_cursors_window100__t-0.20__p-0.95__c-2.00__install-1/marshmallow-code__marshmallow-1867.traj
+ - trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__xml_sys-env_cursors_window100__t-0.20__p-0.95__c-2.00__install-1/marshmallow-code__marshmallow-1867.traj
diff --git a/config/configs/xml_sys-env_cursors_window100-detailed_cmd_format-last_5_history-1_demos.yaml b/config/configs/xml_sys-env_cursors_window100-detailed_cmd_format-last_5_history-1_demos.yaml
index 9f96e1a7..f039c93c 100644
--- a/config/configs/xml_sys-env_cursors_window100-detailed_cmd_format-last_5_history-1_demos.yaml
+++ b/config/configs/xml_sys-env_cursors_window100-detailed_cmd_format-last_5_history-1_demos.yaml
@@ -79,10 +79,10 @@ state_command:
code: |
state() {
local working_dir="$PWD";
- if [ -z $CURRENT_FILE ]; then
+ if [ -z "$CURRENT_FILE" ]; then
echo '{"open_file": "n/a", "working_dir": "'$working_dir'"}';
else
- echo '{"open_file": "'$(realpath $CURRENT_FILE)'", "working_dir": "'$working_dir'"}';
+ echo '{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}';
fi
};
parse_function: XMLThoughtActionParser
@@ -90,7 +90,7 @@ env_variables:
WINDOW: 200
OVERLAP: 2
CURRENT_LINE: 0
- CURRENT_FILE: ''
+ CURRENT_FILE: ""
SEARCH_RESULTS: ()
SEARCH_FILES: ()
SEARCH_INDEX: 0
@@ -98,14 +98,14 @@ env_variables:
END_INDEX: 0
START_CURSOR: 0
END_CURSOR: 0
- START_CURSOR_MARK: '"<<<<< START CURSOR >>>>>"' # these have to use double quotes
+ START_CURSOR_MARK: '"<<<<< START CURSOR >>>>>"' # these have to use double quotes
END_CURSOR_MARK: '"<<<<< END CURSOR >>>>>"' # these have to use double quotes
command_files:
-- config/commands/cursors_defaults.sh
-- config/commands/cursors_edit_linting.sh
-- config/commands/search.sh
-- config/commands/_split_string.py
+ - config/commands/cursors_defaults.sh
+ - config/commands/cursors_edit_linting.sh
+ - config/commands/search.sh
+ - config/commands/_split_string.py
parse_command: ParseCommandDetailed
history_processor: Last5Observations
demonstrations:
-- trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__xml_sys-env_cursors_window100__t-0.20__p-0.95__c-2.00__install-1/marshmallow-code__marshmallow-1867.traj
+ - trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__xml_sys-env_cursors_window100__t-0.20__p-0.95__c-2.00__install-1/marshmallow-code__marshmallow-1867.traj
diff --git a/config/configs/xml_sys-env_window100-detailed_cmd_format-full_history-1_demos.yaml b/config/configs/xml_sys-env_window100-detailed_cmd_format-full_history-1_demos.yaml
index dc4178de..549b30d6 100644
--- a/config/configs/xml_sys-env_window100-detailed_cmd_format-full_history-1_demos.yaml
+++ b/config/configs/xml_sys-env_window100-detailed_cmd_format-full_history-1_demos.yaml
@@ -78,10 +78,10 @@ state_command:
code: |
state() {
local working_dir="$PWD";
- if [ -z $CURRENT_FILE ]; then
+ if [ -z "$CURRENT_FILE" ]; then
echo '{"open_file": "n/a", "working_dir": "'$working_dir'"}';
else
- echo '{"open_file": "'$(realpath $CURRENT_FILE)'", "working_dir": "'$working_dir'"}';
+ echo '{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}';
fi
};
parse_function: XMLThoughtActionParser
@@ -89,16 +89,16 @@ env_variables:
WINDOW: 100
OVERLAP: 2
CURRENT_LINE: 0
- CURRENT_FILE: ''
+ CURRENT_FILE: ""
SEARCH_RESULTS: ()
SEARCH_FILES: ()
SEARCH_INDEX: 0
command_files:
-- config/commands/defaults.sh
-- config/commands/search.sh
-- config/commands/edit_linting.sh
-- config/commands/_split_string.py
+ - config/commands/defaults.sh
+ - config/commands/search.sh
+ - config/commands/edit_linting.sh
+ - config/commands/_split_string.py
parse_command: ParseCommandDetailed
history_processor: DefaultHistoryProcessor
demonstrations:
-- trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__xml_sys-env_window100__t-0.20__p-0.95__c-2.00__install-1/marshmallow-code__marshmallow-1867.traj
+ - trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__xml_sys-env_window100__t-0.20__p-0.95__c-2.00__install-1/marshmallow-code__marshmallow-1867.traj
diff --git a/config/configs/xml_sys-env_window100-detailed_cmd_format-last_5_history-1_demos.yaml b/config/configs/xml_sys-env_window100-detailed_cmd_format-last_5_history-1_demos.yaml
index 2c5d5b48..4b135132 100644
--- a/config/configs/xml_sys-env_window100-detailed_cmd_format-last_5_history-1_demos.yaml
+++ b/config/configs/xml_sys-env_window100-detailed_cmd_format-last_5_history-1_demos.yaml
@@ -78,10 +78,10 @@ state_command:
code: |
state() {
local working_dir="$PWD";
- if [ -z $CURRENT_FILE ]; then
+ if [ -z "$CURRENT_FILE" ]; then
echo '{"open_file": "n/a", "working_dir": "'$working_dir'"}';
else
- echo '{"open_file": "'$(realpath $CURRENT_FILE)'", "working_dir": "'$working_dir'"}';
+ echo '{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}';
fi
};
parse_function: XMLThoughtActionParser
@@ -89,16 +89,16 @@ env_variables:
WINDOW: 100
OVERLAP: 2
CURRENT_LINE: 0
- CURRENT_FILE: ''
+ CURRENT_FILE: ""
SEARCH_RESULTS: ()
SEARCH_FILES: ()
SEARCH_INDEX: 0
command_files:
-- config/commands/defaults.sh
-- config/commands/search.sh
-- config/commands/edit_linting.sh
-- config/commands/_split_string.py
+ - config/commands/defaults.sh
+ - config/commands/search.sh
+ - config/commands/edit_linting.sh
+ - config/commands/_split_string.py
parse_command: ParseCommandDetailed
history_processor: Last5Observations
demonstrations:
-- trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__xml_sys-env_window100__t-0.20__p-0.95__c-2.00__install-1/marshmallow-code__marshmallow-1867.traj
+ - trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__xml_sys-env_window100__t-0.20__p-0.95__c-2.00__install-1/marshmallow-code__marshmallow-1867.traj
diff --git a/config/default.yaml b/config/default.yaml
index 7954b2a1..1dcc6e1c 100644
--- a/config/default.yaml
+++ b/config/default.yaml
@@ -84,10 +84,10 @@ state_command:
code: |
state() {
local working_dir="$PWD";
- if [ -z $CURRENT_FILE ]; then
+ if [ -z "$CURRENT_FILE" ]; then
echo '{"open_file": "n/a", "working_dir": "'$working_dir'"}';
else
- echo '{"open_file": "'$(realpath $CURRENT_FILE)'", "working_dir": "'$working_dir'"}';
+ echo '{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}';
fi
};
parse_function: ThoughtActionParser
@@ -95,16 +95,16 @@ env_variables:
WINDOW: 100
OVERLAP: 2
CURRENT_LINE: 0
- CURRENT_FILE: ''
+ CURRENT_FILE: ""
SEARCH_RESULTS: ()
SEARCH_FILES: ()
SEARCH_INDEX: 0
command_files:
-- config/commands/defaults.sh
-- config/commands/search.sh
-- config/commands/edit_linting.sh
-- config/commands/_split_string.py
+ - config/commands/defaults.sh
+ - config/commands/search.sh
+ - config/commands/edit_linting.sh
+ - config/commands/_split_string.py
parse_command: ParseCommandDetailed
history_processor: Last5Observations
demonstrations:
-- trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__default_sys-env_window100__t-0.20__p-0.95__c-2.00__install-1/marshmallow-code__marshmallow-1867.traj
+ - trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__default_sys-env_window100__t-0.20__p-0.95__c-2.00__install-1/marshmallow-code__marshmallow-1867.traj
diff --git a/config/default_from_url.yaml b/config/default_from_url.yaml
index 90e47360..143bf340 100644
--- a/config/default_from_url.yaml
+++ b/config/default_from_url.yaml
@@ -86,10 +86,10 @@ state_command:
code: |
state() {
local working_dir="$PWD";
- if [ -z $CURRENT_FILE ]; then
+ if [ -z "$CURRENT_FILE" ]; then
echo '{"open_file": "n/a", "working_dir": "'$working_dir'"}';
else
- echo '{"open_file": "'$(realpath $CURRENT_FILE)'", "working_dir": "'$working_dir'"}';
+ echo '{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}';
fi
};
parse_function: ThoughtActionParser
diff --git a/config/default_xml.yaml b/config/default_xml.yaml
index 2c5d5b48..4b135132 100644
--- a/config/default_xml.yaml
+++ b/config/default_xml.yaml
@@ -78,10 +78,10 @@ state_command:
code: |
state() {
local working_dir="$PWD";
- if [ -z $CURRENT_FILE ]; then
+ if [ -z "$CURRENT_FILE" ]; then
echo '{"open_file": "n/a", "working_dir": "'$working_dir'"}';
else
- echo '{"open_file": "'$(realpath $CURRENT_FILE)'", "working_dir": "'$working_dir'"}';
+ echo '{"open_file": "'$(realpath "$CURRENT_FILE")'", "working_dir": "'$working_dir'"}';
fi
};
parse_function: XMLThoughtActionParser
@@ -89,16 +89,16 @@ env_variables:
WINDOW: 100
OVERLAP: 2
CURRENT_LINE: 0
- CURRENT_FILE: ''
+ CURRENT_FILE: ""
SEARCH_RESULTS: ()
SEARCH_FILES: ()
SEARCH_INDEX: 0
command_files:
-- config/commands/defaults.sh
-- config/commands/search.sh
-- config/commands/edit_linting.sh
-- config/commands/_split_string.py
+ - config/commands/defaults.sh
+ - config/commands/search.sh
+ - config/commands/edit_linting.sh
+ - config/commands/_split_string.py
parse_command: ParseCommandDetailed
history_processor: Last5Observations
demonstrations:
-- trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__xml_sys-env_window100__t-0.20__p-0.95__c-2.00__install-1/marshmallow-code__marshmallow-1867.traj
+ - trajectories/demonstrations/replay__marshmallow-code__marshmallow-1867__xml_sys-env_window100__t-0.20__p-0.95__c-2.00__install-1/marshmallow-code__marshmallow-1867.traj