42 lines
1.3 KiB
Bash
42 lines
1.3 KiB
Bash
alias vi='vim'
|
|
sudo() { if [[ $# == "1" ]] && [[ $1 == "su" ]]; then command sudo -i; else command sudo "$@"; fi }
|
|
alias history="fc -l 0"
|
|
|
|
##
|
|
# Caracterisation du shell
|
|
##
|
|
|
|
# If this is an xterm set the title to user@host:dir
|
|
case "$TERM" in
|
|
xterm*|rxvt*)
|
|
PS1="\[\e]0;\u@\h: \w\a\]$PS1"
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|
|
|
|
bind -m '^L'='^U 'clear'^M^Y'
|
|
bind '^[[4~'=end-of-line
|
|
bind '^[[1~'=beginning-of-line
|
|
bind '^[[3~'=delete-char-forward
|
|
bind '^[[8~'=end-of-line
|
|
bind '^[[7~'=beginning-of-line
|
|
bind '^[Oc'=forward-word
|
|
bind '^[Od'=backward-word
|
|
bind '^[^[[C'=forward-word
|
|
bind '^[^[[D'=backward-word
|
|
|
|
set -A complete_kill_1 -- -9 -HUP -INFO -KILL -TERM
|
|
PKG_LIST=$(ls -1 /var/db/pkg)
|
|
set -A complete_pkg_delete -- $PKG_LIST
|
|
set -A complete_pkg_info -- $PKG_LIST
|
|
set -A complete_rcctl_1 -- disable enable get ls order set reload check restart stop start
|
|
set -A complete_rcctl_2 -- $(ls /etc/rc.d)
|
|
set -A complete_signify_1 -- -C -G -S -V
|
|
set -A complete_signify_2 -- -q -p -x -c -m -t -z
|
|
set -A complete_signify_3 -- -p -x -c -m -t -z
|
|
set -A complete_make_1 -- install clean repackage reinstall
|
|
set -A complete_gpg2 -- --refresh --receive-keys --armor --clearsign --sign --list-key --decrypt --verify --detach-sig
|
|
set -A complete_git -- pull push mpull mpush status clone branch add rm checkout fetch show tag commit
|
|
set -A complete_ifconfig_1 -- $(ifconfig | grep ^[a-z] | cut -d: -f1)
|