⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 zsh_completion.sh

📁 VLC Player Source Code
💻 SH
字号:
#!/usr/bin/env zsh# Helper script to install zsh completion for VLC media player# 漏 2008 Rafa毛l Carr茅 <funman@videolanorg>HOST=`gcc -dumpmachine`case $HOST in    *darwin*)        SUFFIX=dylib    ;;    *cygwin*|*mingw*)        SUFFIX=dll    ;;    *linux*|*bsd*)        SUFFIX=so    ;;    *)        echo WARNING: Unknown platform: \'$HOST\'    ;;esacif test -z "$SUFFIX"; then    echo "ERROR: unknown suffix for shared objectsPlease run \"SUFFIX=xxx $0\"where xxx is the shared object extension on your platform."    exit 1fi#Distributors can run BUILDDIR=XXX ./zsh_completion.shif test -z "$BUILDDIR"; then    BUILDDIR=../../fifunction find_libvlc {    for i in $BUILDDIR/src/.libs/libvlc.$SUFFIX $BUILDDIR/src/libvlc.$SUFFIX; do        test -e $i && LIBVLC=$i && return 0    done    return 1}while test -z "$LIBVLC"; do    if ! find_libvlc; then        /bin/echo -n "Please enter the directory where you built vlc: "        read BUILDDIR    fidoneecho "libvlc found !"LD_LIBRARY_PATH=$BUILDDIR/src/.libsif test -e ../../extras/contrib/config.mak -a ! "`grep HOST ../../extras/contrib/config.mak 2>/dev/null|awk '{print $3}'`" != "$HOST"; then    echo "contribs found !"    CPPFLAGS="-I../../extras/contrib/include"fiif test -z "$CXX"; then    CXX=g++fiZSH_BUILD="$CXX $CPPFLAGS $CXXFLAGS -D__LIBVLC__ -DHAVE_CONFIG_H -I$BUILDDIR -I$BUILDDIR/include -I../../include zsh.cpp $LIBVLC -o zsh_gen"echo "Building zsh completion generator ...  "echo $ZSH_BUILDechoeval $ZSH_BUILD || exit 1echo "Generating zsh completion ..."if ! ./zsh_gen --plugin-path=$BUILDDIR >_vlc 2>/dev/null; then    echo "ERROR: the generation failed.... :(Please press enter to verify that all the VLC modules are shown"    read i    ./zsh_gen --plugin-path=$BUILDDIR -vvv --list    echo "If they are shown, press enter to see if you can debug the problemIt will be reproduced by running \"./zsh_gen --plugin-path=$BUILDDIR -vvv\""    read i    ./zsh_gen --plugin-path=$BUILDDIR -vvv    exit 1fiecho "zsh completion is `echo \`wc -l _vlc\`` lines long !"test -z "$NOINSTALL" || exit 0#Distributors can run NOINSTALL=mg ./zsh_completion.shif ! /usr/bin/which zsh >/dev/null 2>&1; then    echo "ERROR: zsh not found, you'll have to copy the _vlc file manually"    exit 1fitest -z "$ZSH_FPATH" && ZSH_FPATH=`zsh -c "echo \\$fpath|cut -d\" \" -f1"`if test -z "$ZSH_FPATH"; then    echo "ERROR: Could not find a directory where to install completionPlease run \"ZSH_FPATH=path $0\"where path is the directory where you want to install completion"    exit 1fiecho "completion will be installed in $ZSH_FPATH , using root privilegesPress Ctrl+C to abort installation, and copy _vlc manually"read iecho "Installing completion ..."sudo sh -c "chown 0:0 _vlc && chmod 0644 _vlc && mv _vlc $ZSH_FPATH" || exit 1echo "zsh completion for VLC successfully installed :)Restart running zsh instances, or run \"compinit\" to start using it."

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -