Bug Description
Output Variable includes a newline, even when output explicitly removes it and makes it unsuitable for using in the middle of other script blocks as it's likely to break commands up unless its used at the end.
Steps to Reproduce
I think the screenshot will do!
- Echo writes to stdout without a newline
- We make another echo using the output variable made from the first and we can see that it now includes a newline, which is displayed as $ from cat
Expected Behavior
Output variables should have newlines stripped to be able to used anywhere, if a user wants a newline they should add it themselves
Environment
- OS: CachyOS
- Atuin Desktop Version: v0.1.11
- Atuin CLI Version: N/A
- Shell: present with zsh, bash, and fish
- Terminal: Konsole
Workaround
As pointed out by @BenediktFloeser adding the trim function from minijinja to the output variable will strip the newline in the meantime (e.g. {{ var.hello | trim }}
Bug Description
Output Variable includes a newline, even when output explicitly removes it and makes it unsuitable for using in the middle of other script blocks as it's likely to break commands up unless its used at the end.
Steps to Reproduce
I think the screenshot will do!
Expected Behavior
Output variables should have newlines stripped to be able to used anywhere, if a user wants a newline they should add it themselves
Environment
Workaround
As pointed out by @BenediktFloeser adding the trim function from minijinja to the output variable will strip the newline in the meantime (e.g. {{ var.hello | trim }}