command line history broken in 11.0

Ernie Luzar luzar722 at gmail.com
Mon Mar 20 18:05:10 UTC 2017


On 10.3 I had the current session saving the command line history when 
issuing the shutdown, halt, and reboot command by using these alias 
commands that I added to the .cshrc file of my logged in user account.

alias sd	"exit && shutdown now"
alias sdp	"exit && shutdown -p now"
alias rboot     "exit && reboot"
alias stop      "exit && halt"

Now after doing a clean install of 11.0 and using the same .cshrc file 
the rboot and stop alias commands no longer save the current history. 
They act like the exit command is not getting executed. The sd and sdp 
alias commands are working as expected.

When existing from a session terminal by issuing the exit command does 
still save the current history.

Is there an alternate method I can use?

Here is my .cshrc file

  alias sd	"exit && shutdown now"
  alias sdp	"exit && shutdown -p now"
  alias rboot    "exit && reboot"
  alias stop     "exit && halt"



  # A righteous umask
  umask 22

  set path = (/sbin /bin /usr/sbin /usr/bin /usr/local/sbin 
/usr/local/bin $HOME/bin)

  setenv	EDITOR	ee
  setenv	PAGER	more
  setenv	BLOCKSIZE	K

  if ($?prompt) then
  	# An interactive shell -- set some stuff up
  	set prompt = "%/ >"
  	set filec
  	set history = 100
  	set savehist = (100 merge)
        set histdup = erase
  	set autolist = ambiguous
  	# Use history to aid expansion
  	set autoexpand
  	set autorehash
  	set mail = (/var/mail/$USER)
  	if ( $?tcsh ) then
  		bindkey "^W" backward-delete-word
  		bindkey -k up history-search-backward
  		bindkey -k down history-search-forward
  	endif
  endif






More information about the freebsd-questions mailing list