Shell: webdl aliases.
Shell: completion for some scripts. Scripts: minor fixes.master
parent
ee082ddf2c
commit
989691a67e
|
@ -2,10 +2,19 @@
|
|||
|
||||
## Format C using 'indent'. Alternative to indent: astyle, uncrustify.
|
||||
if [ -z "$(command -v indent)" ]; then
|
||||
echo "Please install 'indent'"
|
||||
echo "Please install 'indent'."
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ "$1" = "-h" ]; then
|
||||
cat<<EOF
|
||||
Usage: ${0##*/} [FILES|FOLDERS]
|
||||
|
||||
Format C source code using indent.
|
||||
EOF
|
||||
fi
|
||||
|
||||
|
||||
_formatc_dir()
|
||||
{
|
||||
find "$1" -type f \
|
||||
|
@ -27,7 +36,10 @@ if [ $# -eq 0 ]; then
|
|||
fi
|
||||
|
||||
for i ; do
|
||||
echo "[$i]"
|
||||
if [ ! -e "$i" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
|
||||
if [ -d "$i" ]; then
|
||||
_formatc_dir "$i"
|
||||
|
|
|
@ -91,6 +91,10 @@ alias xmorphzi='xrandr --output $(xrandr | grep "\<connected\>" | cut -f1 -d" ")
|
|||
|
||||
alias xres='xrandr -s $(xrandr | awk '"'"'/^ / {print $1;exit}'"'"')'
|
||||
|
||||
# Web videos DL
|
||||
alias webdl720='movgrab -f webm:1280x720'
|
||||
alias webdl1080='movgrab -f webm:1920x1080'
|
||||
|
||||
##==============================================================================
|
||||
## Zsh power aliases
|
||||
##==============================================================================
|
||||
|
|
|
@ -3,11 +3,17 @@
|
|||
## Completion
|
||||
##==============================================================================
|
||||
if [ "zsh" = "$SHELL_CURRENT" ]; then
|
||||
compdef _gcc crun
|
||||
compdef _gcc formatc
|
||||
compdef _gs pdfcompress
|
||||
compdef _gs pdfextract
|
||||
compdef _gs pdfresize
|
||||
compdef _pacman pacman-color
|
||||
compdef _pcc pacman-deps
|
||||
compdef _pcc pacman-files
|
||||
compdef _pcc pacman-size
|
||||
compdef _pcc pql
|
||||
compdef _tex ltx
|
||||
compdef _zathura zat
|
||||
elif [ "bash" = "$SHELL_CURRENT" ]; then
|
||||
complete -o default -o nospace -F _pacman pacman-color
|
||||
|
|
Loading…
Reference in New Issue