Difference between revisions of "Better Bash Configs"

From TheBeard Science Project Wiki
Jump to: navigation, search
(Created page with " These are just some things I add to my bashrc for enhancing the features of Bash. <source lang="sh"> # For better tab completion on symlink directories # Normal behavior: W...")
 
Line 3: Line 3:
  
 
<source lang="sh">
 
<source lang="sh">
 +
 +
# Because sometimes I manipulate $IFS and forget what to change it back to
 +
export SAVEIFS=$IFS
 +
 +
# Set your default editor for systemd (like when using systemctl edit thing.service)
 +
export SYSTEMD_EDITOR="/usr/bin/vim"
 +
 +
# Stop putting quotes around files/folders that have spaces
 +
export QUOTING_STYLE=literal
 +
 +
# Make it so the screen doesn't blank out after a period of time
 +
setterm -blank 0 >&/dev/null
 +
 +
# Set a nice font
 +
setfont /usr/share/consolefonts/Lat15-TerminusBold22x11.psf.gz >&/dev/null
  
 
# For better tab completion on symlink directories
 
# For better tab completion on symlink directories

Revision as of 19:46, 12 January 2020

These are just some things I add to my bashrc for enhancing the features of Bash.

# Because sometimes I manipulate $IFS and forget what to change it back to
export SAVEIFS=$IFS

# Set your default editor for systemd (like when using systemctl edit thing.service)
export SYSTEMD_EDITOR="/usr/bin/vim"

# Stop putting quotes around files/folders that have spaces
export QUOTING_STYLE=literal

# Make it so the screen doesn't blank out after a period of time
setterm -blank 0 >&/dev/null

# Set a nice font
setfont /usr/share/consolefonts/Lat15-TerminusBold22x11.psf.gz >&/dev/null

# For better tab completion on symlink directories
# Normal behavior: With folder symlink "Documents", Type "Doc", Tab once auto-completes
#                  to "Documents", Tab again it completes to "Documents/".
# New behavior:    With folder symlink "Documents", Type "Doc", Tab once auto-completes
#                  to "Documents/". Nice.
if ! [ -d "~/.inputrc" ];then
        if [ -r "/etc/inputrc" ];then
                cp /etc/inputrc ~/.inputrc
        elif [ -r "/etc/inputrc.default" ];then
                cp /etc/inputrc.default ~/.inputrc
        else
                touch ~/.inputrc
        fi
        echo -e "\nset mark-symlinked-directories on" >>~/.inputrc
fi