Util-Linux Archive on lore.kernel.org
 help / color / Atom feed
From: Chris Hofstaedtler <zeha@debian.org>
To: kerolasa@gmail.com
Cc: util-linux <util-linux@vger.kernel.org>
Subject: Re: [PATCH] hexdump: automatically use -C when called as hd
Date: Tue, 23 Jun 2020 19:06:33 +0200
Message-ID: <20200623170633.mdpukzxjr4v7gkmw@percival.namespace.at> (raw)
In-Reply-To: <CAG27Bk1DNLjV0uVqLVX=0BN=50xxxkX0szStyatwAytNmOcA8A@mail.gmail.com>

* Sami Kerola <kerolasa@iki.fi> [200623 13:17]:
> On Tue, 23 Jun 2020 at 01:15, Chris Hofstaedtler <zeha@debian.org> wrote:
> >
> > When invoking hexdump as hd enable the "Canonical" format to by
> > default, implying the -C option.
> >
> > This is historic behaviour on Debian and apparently also on FreeBSD.
> > Some Debian users have asked for this to be restored, after Debian
> > switched to util-linux' hexdump and hd.
> 
> Wouldn't it make more sense to add an alias to a global profile?
> 
> alias hd='hexdump -C'

That's not scalable on Debian given the number of shells we ship.
Also, util-linux already has a number of binaries that modify their
behaviour depending on the name they are invoked as.

FreeBSD has this here:
https://github.com/freebsd/freebsd/blame/master/usr.bin/hexdump/hexsyntax.c#L59
And supports it for over 24 years; I believe Debian shipped with
this support since basically forever, too.

Chris

  reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-23  0:14 Chris Hofstaedtler
2020-06-23 11:17 ` Sami Kerola
2020-06-23 17:06   ` Chris Hofstaedtler [this message]
2020-06-24 14:41 ` Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200623170633.mdpukzxjr4v7gkmw@percival.namespace.at \
    --to=zeha@debian.org \
    --cc=kerolasa@gmail.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Util-Linux Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/util-linux/0 util-linux/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 util-linux util-linux/ https://lore.kernel.org/util-linux \
		util-linux@vger.kernel.org
	public-inbox-index util-linux

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.util-linux


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git