mirror of
https://github.com/lawrencesystems/dotfiles.git
synced 2025-03-05 20:49:40 -08:00
Merge f8892c099e
into 7f48adca67
This commit is contained in:
commit
c50a06f8b3
|
@ -6,3 +6,36 @@ alias dc='cd'
|
|||
alias nethack-online='ssh nethack@nethack.alt.org ; clear'
|
||||
alias tron-online='ssh sshtron.zachlatta.com ; clear'
|
||||
alias glog='git log --oneline --graph --color --all --decorate'
|
||||
|
||||
# 30 Handy Bash Shell Aliases For Linux / Unix / MacOS
|
||||
# https://www.cyberciti.biz/tips/bash-aliases-mac-centos-linux-unix.html
|
||||
alias ports='netstat -tulanp'
|
||||
#16: Add safety nets
|
||||
# do not delete / or prompt if deleting more than 3 files at a time #
|
||||
alias rm='rm -I --preserve-root'
|
||||
# confirmation #
|
||||
alias mv='mv -i'
|
||||
alias cp='cp -i'
|
||||
alias ln='ln -i'
|
||||
# Parenting changing perms on / #
|
||||
alias chown='chown --preserve-root'
|
||||
alias chmod='chmod --preserve-root'
|
||||
alias chgrp='chgrp --preserve-root'
|
||||
#20: Pass halt/reboot via sudo
|
||||
# reboot / halt / poweroff
|
||||
alias reboot='sudo /sbin/reboot'
|
||||
alias poweroff='sudo /sbin/poweroff'
|
||||
alias halt='sudo /sbin/halt'
|
||||
alias shutdown='sudo /sbin/shutdown'
|
||||
#21: Control web servers
|
||||
# also pass it via sudo so whoever is admin can reload it without calling you #
|
||||
alias nginxreload='sudo /usr/local/nginx/sbin/nginx -s reload'
|
||||
alias nginxtest='sudo /usr/local/nginx/sbin/nginx -t'
|
||||
alias lightyload='sudo /etc/init.d/lighttpd reload'
|
||||
alias lightytest='sudo /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf -t'
|
||||
alias httpdreload='sudo /usr/sbin/apachectl -k graceful'
|
||||
alias httpdtest='sudo /usr/sbin/apachectl -t && /usr/sbin/apachectl -t -D DUMP_VHOSTS'
|
||||
#27 Resume wget by default
|
||||
## this one saved by butt so many times ##
|
||||
alias wget='wget -c'
|
||||
|
||||
|
|
9
.bashrc
9
.bashrc
|
@ -10,15 +10,18 @@ esac
|
|||
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
# See bash(1) for more options
|
||||
HISTCONTROL=ignoreboth
|
||||
HISTCONTROL=ignoredups:erasedups
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
shopt -s histappend
|
||||
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
HISTSIZE=1000
|
||||
HISTSIZE=10000
|
||||
HISTFILESIZE=2000
|
||||
|
||||
# After each command, append to the history file and reread it
|
||||
PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
@ -109,7 +112,7 @@ fi
|
|||
|
||||
# some more ls aliases
|
||||
alias ll='ls -l'
|
||||
alias la='ls -A'
|
||||
alias la='ls -laFGh'
|
||||
alias l='ls -CF'
|
||||
|
||||
# Alias definitions.
|
||||
|
|
15
.inputrc
Normal file
15
.inputrc
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Start typing than press up / down arrow to autocomplete command from history
|
||||
"\e[A": history-search-backward
|
||||
"\e[B": history-search-forward
|
||||
|
||||
# Complete things that have been typed in the wrong case:
|
||||
set completion-ignore-case on
|
||||
|
||||
# When listing possible file completions, put / after directory names and * after programs:
|
||||
set visible-stats on
|
||||
|
||||
# List the possible completions when Tab is pressed:
|
||||
set show-all-if-ambiguous on
|
||||
|
||||
# Make Meta+S cycle through the list:
|
||||
"\M-s": menu-complete
|
Loading…
Reference in a new issue