command line history broken in 11.0
Trond Endrestøl
Trond.Endrestol at fagskolen.gjovik.no
Tue Mar 21 14:48:26 UTC 2017
On Tue, 21 Mar 2017 09:56-0400, Ernie Luzar wrote:
> Trond Endrestøl wrote:
> > On Mon, 20 Mar 2017 14:05-0400, Ernie Luzar wrote:
> >
> > > 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
> >
> >
> > Wouldn't it be more practical to reverse your aliases and change the
> > conjunctions to unconditional sequences?
> >
> > alias sd "shutdown now; exit"
> > alias sdp "shutdown -p now; exit"
> > alias rboot "reboot; exit"
> > alias stop "halt; exit"
> >
>
> Tested your suggestion and it had no effect on the problem.
>
> I also tried this variation
> alias rboot "exit && sleep 5 && reboot"
> and it also had no effect on the problem.
>
> Does anyone know if reboot/halt had any changes between 10.3 and 11.0?
Running a command like this one in csh has always had the desired
effect:
shutdown -r now Upgrade to base/stable/11 r315683. ; exit
I usually just type in the first initial characters, like "shu", hit
the up arrow key one or more times, edit the command if needed, read
the entire command one more time, and hit the enter key.
--
+-------------------------------+------------------------------------+
| Vennlig hilsen, | Best regards, |
| Trond Endrestøl, | Trond Endrestøl, |
| IT-ansvarlig, | System administrator, |
| Fagskolen Innlandet, | Gjøvik Technical College, Norway, |
| tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, |
| sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. |
+-------------------------------+------------------------------------+
More information about the freebsd-questions
mailing list