OCA-Creations / Ally

A powerful command-line tool for managing ZSH aliases, written in Swift.
MIT License
2 stars 0 forks source link

[BUG] Ally is unable to handle multi-line commands #1

Open MrDevel0per opened 1 year ago

MrDevel0per commented 1 year ago

Ally does not specifically prohibit the use of multi-line arguments when using add or any other command. However, a multi-line command is not properly removed when using remove, is not properly executed or encapsulated with quotes in .ally, and causes an Index Out Of Range Error (which should probably be checked first) on list. This is outputted as: Swift/ContiguousArrayBuffer.swift:600: Fatal error: Index out of range, and occurs on these lines: https://github.com/OCA-Creations/Ally/blob/c943c24a9eeff2db265ef94bf06cfa7cb472a99a/Sources/Helpers/DotFile.swift#L64-L73 More specifically, on line 73, where we get the second index ([1]) of parts. To summarize, we must choose one of the following:

Option One: Prohibit multiline arguments

Option Two: Handle Multiline Arguments

The details for these will be updated soon.