Shell: added completion for typex and abs-wrapper

master
Pierre Neidhardt 2013-08-04 16:34:22 +02:00
parent 01193372d2
commit c2b1df3f25
4 changed files with 9 additions and 21 deletions

View File

@ -1,16 +0,0 @@
en.wikibooks.org
login.wikimedia.org
bbs.archlinux.org
wiki.archlinux.org
.github.com
github.com
bitbucket.org
.openmw.org
openmw.org
en.wikipedia.org
sourceforge.net
.sourceforge.net
particuliers.societegenerale.fr
particuliers.secure.societegenerale.fr
aur.archlinux.org
.imdb.com

View File

@ -87,11 +87,11 @@ if [ -d "$SOURCEDIR" ]; then
echo "Variable BROWSER is not set."
else
BROWSER_DATA_DIR="$XDG_DATA_HOME/$BROWSER/"
if [ "$BROWSER" = "dwb" ]; then
BROWSER_DATA_DIR="$XDG_CONFIG_HOME/$BROWSER/default/"
fi
[ "$BROWSER" = "dwb" ] && BROWSER_DATA_DIR="$XDG_CONFIG_HOME/$BROWSER/default/"
[ -d "$SOURCEDIR" ] && ln -sf "$SOURCEDIR/bookmarks/bookmarks" "$BROWSER_DATA_DIR"
[ -d "$SOURCEDIR" ] && ln -sf "$SOURCEDIR/bookmarks/quickmarks" "$BROWSER_DATA_DIR"
[ -d "$SOURCEDIR" ] && ln -sf "$SOURCEDIR/bookmarks/cookies.allow" "$BROWSER_DATA_DIR"
fi
echo
fi

View File

@ -5,10 +5,9 @@
## Let's check if pacman completion is already loaded. If not, we parse the
## pacman completion file.
if [ -n "$(type _pacman_action_none | grep "not found")" ]; then
source "/usr/share/zsh/site-functions/_pacman"
source "/usr/share/zsh/site-functions/_pacman"
fi
_pcc()
{
case $words[1] in
@ -28,9 +27,11 @@ _pcc()
pacman-files)
_pacman_action_query
return ;;
pql)
_pacman_action_query
return ;;
pacman-size)
case $words[2] in
-*q*)
@ -44,6 +45,7 @@ _pcc()
esac
return ;;
*)
_pacman_action_sync
return 1
;;
esac

View File

@ -14,5 +14,7 @@ if [ "zsh" = "$SHELL_CURRENT" ]; then
compdef _pcc pacman-size
compdef _pcc pql
compdef _tex ltx
compdef _path_commands typex
compdef _zathura zat
compdef _pcc abs-wrapper
fi