Bug 283414

Summary: jls (8) doesn't handle newlines in values consistently
Product: Base System Reporter: Dave Cottlehuber <dch>
Component: binAssignee: freebsd-jail (Nobody) <jail>
Status: Open ---    
Severity: Affects Some People CC: igoro, ziaee
Priority: ---    
Version: 14.2-RELEASE   
Hardware: Any   
OS: Any   

Description Dave Cottlehuber freebsd_committer freebsd_triage 2024-12-19 11:09:12 UTC
# jail -c persist osrelease="$(echo major=1; echo minor=0)"
# jls
JID IP Address Hostname Path
145 /
# jls osrelease jid
major=1
minor=0 145

the manpage clearly states:

Each jail is represented by one row which contains space-separated values of the listed parameter

Either we should amend the manpage, or swap newlines for spaces consistently on all parameters.

It seems that a trailing newline is removed, so perhaps for consistency we should replace all newlines with space when this single-line output is used.