Skip to content

Commit

Permalink
Include "Append to File" option in code snippet picker
Browse files Browse the repository at this point in the history
  • Loading branch information
Waboodoo committed Sep 13, 2024
1 parent d572fcf commit e71d4dc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@ constructor(
) {
insertText("getDirectory(\"\").writeFile(\"", "\", \"...\");\n")
}
item(
R.string.dialog_code_snippet_append_to_file,
docRef = "read-write-files",
keywords = setOf("files", "write", "store", "persist", "add", "attach"),
) {
insertText("getDirectory(\"\").appendFile(\"", "\", \"...\");\n")
}
item(
R.string.dialog_code_snippet_get_file_name,
docRef = "files",
Expand Down
2 changes: 2 additions & 0 deletions HTTPShortcuts/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,8 @@
<string name="dialog_code_snippet_read_from_file">Read from File</string>
<!-- Dialog option: shown in code snippet picker, option to write data to a file -->
<string name="dialog_code_snippet_write_to_file">Write to File</string>
<!-- Dialog option: shown in code snippet picker, option to append data to a file -->
<string name="dialog_code_snippet_append_to_file">Append to File</string>
<!-- Dialog option: shown in code snippet picker, option to get the name of a selected file -->
<string name="dialog_code_snippet_get_file_name">Get Name of Selected File</string>
<!-- Dialog option: shown in code snippet picker, option to get the type of a selected file -->
Expand Down

0 comments on commit e71d4dc

Please sign in to comment.