Added if statement for pkgfile, syntax highlighting for less, added
weechat alias.
This commit is contained in:
parent
b912cc3a2c
commit
2faa1e480a
38
.bashrc
38
.bashrc
|
@ -3,17 +3,32 @@
|
|||
#
|
||||
# Thurstylark
|
||||
|
||||
### MISC ###
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
export EDITOR=vim
|
||||
|
||||
# Don't put duplicate lines or lines starting with space in the history.
|
||||
# See bash(1) for more options
|
||||
HISTCONTROL=ignoreboth
|
||||
|
||||
# Enable pkgfile to automatically search for packages:
|
||||
source /usr/share/doc/pkgfile/command-not-found.bash
|
||||
# Prefer vim, but if it's not installed, nano will do
|
||||
if [[ -s /usr/bin/vim ]]; then
|
||||
export EDITOR=vim
|
||||
else
|
||||
export EDITOR=nano
|
||||
fi
|
||||
|
||||
# Enable pkgfile to automatically search for packages if pkgfile is installed
|
||||
if [[ -s /usr/share/doc/pkgfile/command-not-found.bash ]];then
|
||||
source /usr/share/doc/pkgfile/command-not-found.bash
|
||||
fi
|
||||
|
||||
# Enable less syntax hilighting if src-hilight is installed
|
||||
if [[ -s /usr/bin/src-hilite-lesspipe.sh ]]; then
|
||||
export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s"
|
||||
export LESS=' -R '
|
||||
fi
|
||||
|
||||
# If a directory is given without any
|
||||
# command, CD into it.
|
||||
|
@ -59,3 +74,18 @@ alias lsblk='lsblk -o NAME,FSTYPE,SIZE,TYPE,MOUNTPOINT'
|
|||
|
||||
# Always use sudo when using systemctl. Pairs well with passwordless sudo for systemctl.
|
||||
alias systemctl='sudo --preserve-env systemctl'
|
||||
|
||||
# I'm tired of managing weechat configs and multiple nicks
|
||||
# Client depends: ssh, mosh, correct ssh host configuration
|
||||
# Server depends: ssh, mosh, screen, weechat, weechat.service (custom)
|
||||
|
||||
# Only do this if weechat isn't installed and you aren't thurstyserv
|
||||
if [[ ! -s /usr/bin/weechat ]]; then
|
||||
# Connect to the existing screen session through mosh
|
||||
# (disconnecting it elsewhere if necessary)
|
||||
alias weechat='mosh home -- screen -dr weechat'
|
||||
elif [[ "$HOSTNAME" -eq "thurstyserv" ]]; then
|
||||
# Connect to the existing screen session locally
|
||||
# (disconnecting it elsewhere if necessary)
|
||||
alias weechat='screen -dr weechat'
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue