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." echo "Variable BROWSER is not set."
else else
BROWSER_DATA_DIR="$XDG_DATA_HOME/$BROWSER/" BROWSER_DATA_DIR="$XDG_DATA_HOME/$BROWSER/"
if [ "$BROWSER" = "dwb" ]; then [ "$BROWSER" = "dwb" ] && BROWSER_DATA_DIR="$XDG_CONFIG_HOME/$BROWSER/default/"
BROWSER_DATA_DIR="$XDG_CONFIG_HOME/$BROWSER/default/"
fi
[ -d "$SOURCEDIR" ] && ln -sf "$SOURCEDIR/bookmarks/bookmarks" "$BROWSER_DATA_DIR" [ -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/quickmarks" "$BROWSER_DATA_DIR"
[ -d "$SOURCEDIR" ] && ln -sf "$SOURCEDIR/bookmarks/cookies.allow" "$BROWSER_DATA_DIR"
fi fi
echo echo
fi fi

View File

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

View File

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