You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a tricky case, because we have to make assumptions that simplify the user's life whenever using |/<a-|>. On one hand we assume that the command is a filter, so we add a newline character to the selection so that the user doesn't have to do it manually, but on the other hand sometimes the user wants to pipe the selection and only that (i.e. your exact case), which forces them to modify the command (and even that won't be reliable in all cases, unfortunately).
Going one way or another will be an inconvenience to both side as they hit one case or the other, and adding new primitives doesn't sound too good.
What about creating a special register that would contain flags that activate or deactivate side effects on some commands?
Hi
This is somehow related to #1216 where mawww explains the rational behind the fact that
|
always add a newline to selections.I was not really aware of this before being confronted to the following situation and found this behavior surprising.
Here's my input text:
Then
%<a-s>HH<a-;>L
, which create the following selections:Which I pipe
|
throughwc -c
. It produces:Which is wrong (well in the sense of what I tried to achieve). It forces to pipe to
tr -d '\n' | wc -c
instead to get the expected result:What's your take on this?
Did you encounter this behavior in other scenarios? Should this deserve another dedicated pipe-without-newline primitive?
The text was updated successfully, but these errors were encountered: