2015-06-13 07:02:33 +00:00
|
|
|
alias ll='ls -lhF'
|
|
|
|
alias la='ls -AF'
|
|
|
|
alias l='ls -CF'
|
|
|
|
alias lla='ls -alF'
|
|
|
|
alias scp='scp -C'
|
|
|
|
alias ssh='ssh -C'
|
|
|
|
alias cp='cp -i'
|
|
|
|
alias mv='mv -i'
|
|
|
|
alias rm='rm -i'
|
|
|
|
alias df='df -h'
|
|
|
|
case "$(uname -s)" in
|
|
|
|
FreeBSD)
|
|
|
|
alias ls='ls -GF'
|
|
|
|
alias t='todo -d ~/.todo.cfg'
|
|
|
|
alias grep='grep --color=auto'
|
|
|
|
;;
|
|
|
|
Linux)
|
|
|
|
alias ls='ls --color=auto -vF'
|
|
|
|
alias t='~/sources/todo.txt-cli/todo.sh -d ~/.todo.cfg'
|
|
|
|
alias grep='grep --color=auto'
|
|
|
|
;;
|
|
|
|
OpenBSD)
|
|
|
|
alias startx="/usr/X11R6/bin/startx & lock -np"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
alias less='less -X'
|
|
|
|
alias youtube='youtube-dl -o "$YDL_TARGET/%(title)s.%(ext)s" --restrict-filenames --prefer-free-formats '
|
|
|
|
alias sudo='sudo '
|
|
|
|
alias ga='git-annex '
|
|
|
|
alias gas='git-annex sync '
|
|
|
|
alias vi='vim '
|
|
|
|
alias tmr='~/bin/tmux_rattach.sh'
|
2019-01-25 18:55:10 +00:00
|
|
|
alias mpc='mpc -f "[%artist% - %title% \[%album%\] %date%]|[%file%]"'
|
2016-04-28 16:47:30 +00:00
|
|
|
# envoie la playlist mpc et lit le meme morceau
|
2015-06-13 07:02:33 +00:00
|
|
|
function mpct() {
|
|
|
|
if [ $1 ] ; then
|
|
|
|
mpc -h $1 clear
|
|
|
|
mpc -f %file% playlist | mpc -h $1 -q add
|
|
|
|
mpc -h $1 play `mpc -f %position% -q current`
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
# recoit la playlist mpc et lit le meme morceau
|
|
|
|
function mpcf() {
|
|
|
|
if [ $1 ] ; then
|
|
|
|
mpc clear
|
|
|
|
mpc -h $1 -f %file% playlist | mpc -q add
|
|
|
|
mpc play `mpc -h $1 -f %position% -q current`
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
# genere un password aleatoire
|
|
|
|
randpw(){
|
2016-04-24 09:35:29 +00:00
|
|
|
strings /dev/urandom | grep -o '[[:graph:]]' | head -n 20 | tr -d '\n'
|
2015-06-13 07:02:33 +00:00
|
|
|
echo
|
|
|
|
}
|
2016-04-28 16:47:30 +00:00
|
|
|
# git status dans tous les sous-repertoires de sources
|
|
|
|
alias srcstatus='show_status -d ~/sources/'
|
2016-07-12 21:31:15 +00:00
|
|
|
|
|
|
|
alias reboot='sudo reboot'
|
|
|
|
alias poweroff='sudo poweroff'
|
|
|
|
alias vm='sudo vm'
|
2017-08-21 16:37:12 +00:00
|
|
|
|
2017-08-21 16:50:31 +00:00
|
|
|
alias myip="host -4 myip.opendns.com resolver1.opendns.com | sed -n 's/myip\.opendns\.com has address \(.*\)$/\1/p'"
|
2018-05-27 09:21:05 +00:00
|
|
|
|
|
|
|
alias ip='ip --color'
|
|
|
|
alias ipb='ip --color --brief'
|
2019-06-15 10:38:34 +00:00
|
|
|
|
|
|
|
alias dc='docker-compose'
|
2019-12-08 08:21:59 +00:00
|
|
|
|
|
|
|
# IP docker container
|
|
|
|
alias d_ip="docker inspect -f '{{ .NetworkSettings.IPAddress }}' "
|