Ofey Chan, aka 'ofey404'
Pretending a subtitle is out there...
If you deleted your bashrc by accident, don’t close current shell! Many valuable configurations can be extracted from it.
Or maybe you make these mistakes:
<<
, mistyping it as <
.If you work under a version control system, you are lucky cause everything can be recovered. Or this post may help.
env
# SHELL=/bin/bash
# SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/2668,unix/unix:/tmp/.ICE-unix/2668
# ...
declare -F
# declare -f j
# declare -f jc
# declare -f unproxy
# ...
Executing this will print commands to show every bash function in current environment.
alias
# ...
# alias tr='todo remove'
# alias typora='/opt/typora/Typora'
# alias vim='nvim'
# alias which='(alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot'
# alias xzegrep='xzegrep --color=auto'
# alias xzfgrep='xzfgrep --color=auto'
# alias xzgrep='xzgrep --color=auto'
# ...
cat /etc/skel/.bashrc
All source ...
, for bash won’t remember which file has been sourced. It just change the environment according the file.
The logic in bashrc is lost, eg: When login with ssh, set $EDITOR
to vim
.
* Style sheet refers to Dr. Brian Robert Callahan