Yes , I only want to change the prompt, but is not working..at least in Xorg(I dont know is has someting to do)
I put in
.profile and
.shrc
in both users, root and mine , the result is the same, in a X11 terminal only get a "#"
probe in lilyterm and xterm
Looks like persistent history was added as a feature in 2021.
Testing quickly, setting export HISTFILE="" in ~/.shrc appears to prevent persistent history retention.
OK, I found the problem. In my .shrc I have this line:
set -o vi
but, then farther down in my .shrc I have these lines:
# # csh like history on arrow up and down
bind ^[[A ed-search-prev-history
bind ^[[B ed-search-next-history
Those bind commands were causing some key bindings to switch back...
I saw that. It is like in linux, but with the difference that linux use different .<shell>.profile files for sh and bash, when on freebsd, we have a common .profile file. csh is different and in fact, I try again, and fwm-crystal and mc works fine with it.
Note that ~/.shrc only gets executed if the ENV variable points to it. When you start urxvt -e {some command} that may not be the case, then ~/.shrc isn't sourced and anything you've set in there doesn't apply. The ENV variable is set in ~/.profile, and it is only executed if it's a login shell...
...But mc fait to launch even from inside the application menu. And that normal because in its desktop file, mc use Exec mc.
And worst, if in ~./.shrc, I add alias mc='env SHELL=/usr/local/bin/bash mc', it works when insinde urxvt or another terminal i run mc, but mc fail if I run urxvt -e mc...
Yes: /usr/src/bin/sh/dot.shrc → /root/.shrc or /usr/src/share/skel/dot.shrc → /usr/share/skel/dot.shrc → ~/.shrcgrep -F 'alias history' $ENV
I don’t know. Nostalgia? According to WP history appeared in early UNIX versions, yet if you look at the version history of above linked files you see...
...if the first variable isn't set sh use by default the file ~/.sh_history. I went on to set these two variable in the ~/.profile, restarted ~/.shrc but it doesn't seem to take effect. .history is still empty and when entering history in the prompt I get the 10 last entry or so of I don't know...
I'm astonished myself... but thanks for providing details! That is much appreciated.
One thing that jumps out at me is that your FreeBSD is 15.0-CURRENT... and that you have Intel graphics. This is different from me, I did not have 15.0-CURRENT...
As for screenshots, try installing grim...
...PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/home/Oleg/bin
EDITOR=vim
XDG_RUNTIME_DIR=/tmp/sway
ENV=/home/Oleg/.shrc
PWD=/home/Oleg
TERM=xterm
HOME=/home/Oleg
USER=Oleg
SHELL=/bin/sh
MM_CHARSET=UTF-8
BLOCKSIZE=K and after I launched it, I saw...
...that the text console doesn't have use of multimedia keys and use of hotkey shortcuts.
Probably alas commands to a shorter command in your .shrc equivalent. I missed that about how it didn't work in the console.
Vidcontrol didn't work on mine, but that may be the way. I tried using man -k...
Modifiying the ~/.shrc file work if you are calling LibreOffice from command line.
It doesn't work for me. I did it and resourced the file without logging out with . : . ~/.config/plasma-workspace/env/path.sh because If I log out I will loose my session because KDE's saving session doesn't...
I have fish shell in my user account. Initially for SH shell functionality I'm adding set -Ux ENV $HOME/.shrc, on all machines other then the one I posed here this variable is stays after elevating su. I have posted earlier that the variable is not propagated in a root shell, nor loaded while...
.../usr/src/bin/sh/main.c tells us that reading commands from the file specified in ENV variable is skipped only for non-interactive or privileged (i.e., suid) shells, so the issue is (or was) probably with the environment (e.g., $ ENV=~/.shrc su vs. $ ENV=/root/.shrc su or something like that).
Yep, if you define ENV in user environment variable, it will pass thru and should work in elevated (su) shell, but it didn't somehow. It works as expected on another machine.
/etc/profile and ~/.profile are read only when sh is started as a login shell. If this is not the case, and you want sh to read ~/.shrc at startup, you have to pass it the ENV variable from the outside.
...TERM=${TERM:-xterm}
export TERM
PAGER=less
export PAGER
# set ENV to a file invoked each time sh is started for interactive use.
ENV=$HOME/.shrc; export ENV
# Query terminal size; useful for serial lines.
if [ -x /usr/bin/resizewin ] ; then /usr/bin/resizewin -z ; fi
# Uncomment to display...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.