Skip to content

Instantly share code, notes, and snippets.

@sudarshang
Created April 24, 2018 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sudarshang/f4785cc529cab34fa7e7c1d9248aa0b1 to your computer and use it in GitHub Desktop.
Save sudarshang/f4785cc529cab34fa7e7c1d9248aa0b1 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Start a new bash shell with a severely filtered environment and no initfile.
if [ -z "$_BFR_RUNNING" ]; then
env -i \
_BFR_RUNNING=1 \
PATH="$PATH" \
LD_LIBRARY_PATH="$LD_LIBRARY_PATH" \
TERM="$TERM" \
SHELL="$SHELL" \
USER="$USER" \
HOME="$HOME/bfr-home" \
LANG="$LANG" \
bash --init-file "$0" "$@" <&0
exit $?
else
unset _BFR_RUNNING
fi
# What remains of this file is the initfile.
USER=user
HOSTNAME=hostname
PS1='\n\[\033[32;45;1m\]\w\[\033[m\]\$ '
eval "$(dircolors -b)"
alias ls='ls --color=auto'
@sudarshang
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment