Skip to content

Fix: Newlines replaced with spaces in botcmd args (#1716)#1717

Merged
sijis merged 3 commits into
errbotio:masterfrom
zaughon:newline-args
May 21, 2025
Merged

Fix: Newlines replaced with spaces in botcmd args (#1716)#1717
sijis merged 3 commits into
errbotio:masterfrom
zaughon:newline-args

Conversation

@zaughon

@zaughon zaughon commented Mar 24, 2025

Copy link
Copy Markdown
Contributor

Original issue from #1307 remains fixed, but preserves newlines in the args:

[@CHANGE_ME ➡ @errbot] >>> !hello
[@CHANGE_ME ➡ @errbot] [␍] line 1
[@CHANGE_ME ➡ @errbot] [␍] line 2
[@CHANGE_ME ➡ @errbot] [␍] 
cmd = 'hello'
args = 'line 1\nline 2'
Hello! You said: line 1
line 2

# new lines in the middle of a command also works:

[@CHANGE_ME ➡ @errbot] >>> !this is a
[@CHANGE_ME ➡ @errbot] [␍] very long
[@CHANGE_ME ➡ @errbot] [␍] command
[@CHANGE_ME ➡ @errbot] [␍] 
cmd = 'this_is_a_very_long_command'
args = ''


[@CHANGE_ME ➡ @errbot] >>> !this is a
[@CHANGE_ME ➡ @errbot] [␍] very long
[@CHANGE_ME ➡ @errbot] [␍] command
[@CHANGE_ME ➡ @errbot] [␍] test
[@CHANGE_ME ➡ @errbot] [␍] 
cmd = 'this_is_a_very_long_command'
args = 'test'


[@CHANGE_ME ➡ @errbot] >>> !this is a
[@CHANGE_ME ➡ @errbot] [␍] very long
[@CHANGE_ME ➡ @errbot] [␍] command
[@CHANGE_ME ➡ @errbot] [␍] with a lot
[@CHANGE_ME ➡ @errbot] [␍] of test
[@CHANGE_ME ➡ @errbot] [␍] 
cmd = 'this_is_a_very_long_command'
args = 'with a lot\nof test'

@sijis sijis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. We didn't consider this case.

@sijis sijis merged commit fd70e41 into errbotio:master May 21, 2025
5 checks passed
kayman-mk pushed a commit to Hapag-Lloyd/errbot that referenced this pull request Jul 2, 2025
…rbotio#1717)

* Fix: Newlines replaced with spaces in botcmd args (errbotio#1716)

* Added command tests for errbotio#1307 and errbotio#1716

---------

Co-authored-by: Martin Flygenring <maf@one.com>
Co-authored-by: Sijis Aviles <sijis.aviles+github@gmail.com>

(cherry picked from commit fd70e41)
kayman-mk pushed a commit to Hapag-Lloyd/errbot that referenced this pull request Jul 2, 2025
…rbotio#1717)

* Fix: Newlines replaced with spaces in botcmd args (errbotio#1716)

* Added command tests for errbotio#1307 and errbotio#1716

---------

Co-authored-by: Martin Flygenring <maf@one.com>
Co-authored-by: Sijis Aviles <sijis.aviles+github@gmail.com>

(cherry picked from commit fd70e41)
kayman-mk pushed a commit to Hapag-Lloyd/errbot that referenced this pull request Jul 2, 2025
…rbotio#1717)

* Fix: Newlines replaced with spaces in botcmd args (errbotio#1716)

* Added command tests for errbotio#1307 and errbotio#1716

---------

Co-authored-by: Martin Flygenring <maf@one.com>
Co-authored-by: Sijis Aviles <sijis.aviles+github@gmail.com>

(cherry picked from commit fd70e41)
kayman-mk pushed a commit to Hapag-Lloyd/errbot that referenced this pull request Jul 2, 2025
…rbotio#1717)

* Fix: Newlines replaced with spaces in botcmd args (errbotio#1716)

* Added command tests for errbotio#1307 and errbotio#1716

---------

Co-authored-by: Martin Flygenring <maf@one.com>
Co-authored-by: Sijis Aviles <sijis.aviles+github@gmail.com>

(cherry picked from commit fd70e41)
kayman-mk pushed a commit to Hapag-Lloyd/errbot that referenced this pull request Jul 2, 2025
🤖 I have created a release *beep* *boop*
---


## [8.0.5](8.0.4...8.0.5)
(2025-07-02)


### Bug Fixes

* add extra_plugin_dir support to FullStackTest
([errbotio#1726](https://github.com/Hapag-Lloyd/errbot/issues/1726))
([fea0d16](fea0d16))
* importlib refactor
([errbotio#1733](https://github.com/Hapag-Lloyd/errbot/issues/1733))
([cb6b890](cb6b890))
* missing py 3.13 version in tox
([errbotio#1731](https://github.com/Hapag-Lloyd/errbot/issues/1731))
([96f922a](96f922a))
* Newlines replaced with spaces in botcmd args
([errbotio#1716](https://github.com/Hapag-Lloyd/errbot/issues/1716))
([errbotio#1717](https://github.com/Hapag-Lloyd/errbot/issues/1717))
([394b8b4](394b8b4))
* update message that plugin config must be a single line
([errbotio#1727](https://github.com/Hapag-Lloyd/errbot/issues/1727))
([a5f003c](a5f003c))
* update tar extract filter
([errbotio#1730](https://github.com/Hapag-Lloyd/errbot/issues/1730))
([ab34e44](ab34e44))


### Documentation

* add example on how to use threaded replies
([errbotio#1728](https://github.com/Hapag-Lloyd/errbot/issues/1728))
([cc51138](cc51138))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: generate-app-token-hl[bot] <151022333+generate-app-token-hl[bot]@users.noreply.github.com>
Co-authored-by: generate-app-token-hl[bot] <generate-app-token-hl[bot]@users.noreply.github.com>
sijis added a commit to sijis/errbot that referenced this pull request Jun 6, 2026
…rbotio#1717)

* Fix: Newlines replaced with spaces in botcmd args (errbotio#1716)

* Added command tests for errbotio#1307 and errbotio#1716

---------

Co-authored-by: Martin Flygenring <maf@one.com>
Co-authored-by: Sijis Aviles <sijis.aviles+github@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants