Search code examples
bashterminalmacos-sierra

Bash printing unnecessary things on new session since MacOS update


The following line in /etc/bashrc_Apple_Terminal

shell_session_history_enable() {
        (umask 077; touch "$SHELL_SESSION_HISTFILE_NEW") <<< THIS LINE
        HISTFILE="$SHELL_SESSION_HISTFILE_NEW"
        SHELL_SESSION_HISTORY=1
    }

is printing something like this on every new session.

/Users/me/.bash_sessions/717F6632-A946-44EE-8A27-2547EDDD09E9.historynew Stats {
  dev: 16777220,
  mode: 33152,
  nlink: 1,
  uid: 501,
  gid: 20,
  rdev: 0,
  blksize: 4096,
  ino: 1406878,
  size: 0,
  blocks: 0,
  atimeMs: 1502801769000,
  mtimeMs: 1502801769000,
  ctimeMs: 1502801769000,
  birthtimeMs: 1502801769000,
  atime: 2017-08-15T12:56:09.000Z,
  mtime: 2017-08-15T12:56:09.000Z,
  ctime: 2017-08-15T12:56:09.000Z,
  birthtime: 2017-08-15T12:56:09.000Z }

Closest thing as to when is since last MacOS update.

What's an elegant way to solve this without changing this file I don't really want to change?


Solution

  • This post answers my question

    How to deactivate bash_history stats print when opening a new terminal window on my mac?

    I didn't entertain the possibility that there was an alias for touch, but indeed this was the case.