paste, join: support attached '-d=' / '-t=' single-'=' separators - #14148
Open
MadeNavaneeth wants to merge 2 commits into
Open
paste, join: support attached '-d=' / '-t=' single-'=' separators#14148MadeNavaneeth wants to merge 2 commits into
MadeNavaneeth wants to merge 2 commits into
Conversation
sylvestre
force-pushed
the
fix/paste-join-equals-separator
branch
from
August 26, 2026 09:01
040b824 to
9c92a3e
Compare
|
GNU testsuite comparison: |
sylvestre
force-pushed
the
fix/paste-join-equals-separator
branch
from
August 26, 2026 10:10
9c92a3e to
676c1bd
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
MadeNavaneeth
force-pushed
the
fix/paste-join-equals-separator
branch
from
August 26, 2026 12:34
676c1bd to
3e15970
Compare
sylvestre
force-pushed
the
fix/paste-join-equals-separator
branch
from
August 26, 2026 16:26
3e15970 to
c8d7af5
Compare
Clap strips the first '=' after a short option, so 'paste -d=' lost the
delimiter entirely ('a=x' printed as 'ax'). Rewrite attached '-d<chars>'
to the long form before parsing, mirroring cut's '-d=' workaround
(uutils#2424). GNU paste accepts this form.
Same clap limitation as in cut/sort/paste: 'join -t=' stripped the '=', so no rows matched and output was empty. Split attached '-t<chars>' into '-t <chars>' (which clap passes through verbatim), keeping caret diagnostics on the arguments as typed. Fixes the empty-output case; GNU accepts 'join -t=' per its docs.
MadeNavaneeth
force-pushed
the
fix/paste-join-equals-separator
branch
from
August 27, 2026 04:54
c8d7af5 to
a63a42e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
While fixing #14120 (
sort -t=), a systematic check of other utilities with single-character separator flags found the same clap limitation still unhandled in two more places:paste -d= f1 f2a=x/b=yax/by— delimiter silently lostjoin -t= f1 f2=Clap strips the first
=after a short option, so the separator arrived as an empty string.cutalready works around this for-d=(#2424), and #14144 does it forsort -t=.Fix
-d<chars>to--delimiters=<chars>before parsing-t<chars>into-t <chars>(join's-thas no long form; the separate form passes through verbatim). Caret diagnostics keep echoing the arguments as typed, per the guidance inclap_localization.rs.Both rewrites preserve separators containing further
=characters, and separate-form usage (paste -d =,join -t =) is untouched.Testing
equals-delim-attachedcase in the EXAMPLE_DATA table (1=2,a=b)test_separator_attached_equalsasserting GNU output byte-exact (1=a=b,2=b=c)test_human_numeric_blank_thousands_sep_locale) fails identically on clean master in this environment