Address PR 30374 as suggested in there:
"Modify the man page to match the behaviour of "ls -q", (done by yamt@ previously) ... modify both the behaviour and documentation for "ls -b" and "ls -B" to make spaces readily apparent. This could be done by adding VIS_WHITE to the flags passed to strvis(3) in the safe_print() function in src/bin/ls/util.c." 'ls -b' now yields foo\sbar (whitespace) foo\tbar (tab) foo\rbar (CR). 'ls -B' now yields foo\040bar foo\011bar foo\015bar.
This commit is contained in:
parent
f5804cdea3
commit
b338995776
@ -1,4 +1,4 @@
|
||||
.\" $NetBSD: ls.1,v 1.58 2006/04/08 12:04:22 yamt Exp $
|
||||
.\" $NetBSD: ls.1,v 1.59 2006/04/08 22:28:06 jschauma Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1980, 1990, 1991, 1993, 1994
|
||||
.\" The Regents of the University of California. All rights reserved.
|
||||
@ -32,7 +32,7 @@
|
||||
.\"
|
||||
.\" @(#)ls.1 8.7 (Berkeley) 7/29/94
|
||||
.\"
|
||||
.Dd October 23, 2005
|
||||
.Dd April 08, 2006
|
||||
.Dt LS 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -78,7 +78,7 @@ Include directory entries whose names begin with a
|
||||
dot
|
||||
.Pq Sq \&. .
|
||||
.It Fl B
|
||||
Force printing of non-printable characters in file names as \\xxx, where xxx
|
||||
Force printing of non-graphic characters in file names as \\xxx, where xxx
|
||||
is the numeric value of the character in octal.
|
||||
.It Fl b
|
||||
As
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: util.c,v 1.28 2005/06/17 14:36:16 hira Exp $ */
|
||||
/* $NetBSD: util.c,v 1.29 2006/04/08 22:28:06 jschauma Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993, 1994
|
||||
@ -37,7 +37,7 @@
|
||||
#if 0
|
||||
static char sccsid[] = "@(#)util.c 8.5 (Berkeley) 4/28/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: util.c,v 1.28 2005/06/17 14:36:16 hira Exp $");
|
||||
__RCSID("$NetBSD: util.c,v 1.29 2006/04/08 22:28:06 jschauma Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
@ -63,7 +63,7 @@ safe_print(const char *src)
|
||||
char *name;
|
||||
int flags;
|
||||
|
||||
flags = VIS_NL | VIS_OCTAL;
|
||||
flags = VIS_NL | VIS_OCTAL | VIS_WHITE;
|
||||
if (f_octal_escape)
|
||||
flags |= VIS_CSTYLE;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user