Private
Server IP : 195.201.23.43  /  Your IP : 3.22.187.118
Web Server : Apache
System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64
User : kdecoratie ( 1041)
PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/bash-completion/completions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/bash-completion/completions/apropos
# man(1) completion                                        -*- shell-script -*-

_man()
{
    local cur prev words cword split
    _init_completion -s -n : || return

    local comprsuffix=".@([glx]z|bz2|lzma|Z)"
    local manext="@([0-9lnp]|[0-9][px]|man|3?(gl|pm))?($comprsuffix)"
    local mansect="@([0-9lnp]|[0-9][px]|3?(gl|pm))"

    case $prev in
        --config-file|-!(-*)C)
            _filedir conf
            return
            ;;
        --local-file|-!(-*)l)
            _filedir "$manext"
            return
            ;;
        --manpath|-!(-*)M)
            _filedir -d
            return
            ;;
        --pager|-!(-*)P)
            compopt -o filenames
            COMPREPLY=( $(compgen -c -- "$cur") )
            return
            ;;
        --preprocessor|-!(-*)p)
            COMPREPLY=( $(compgen -W 'e p t g r v' -- "$cur") )
            return
            ;;
        --locale|--systems|--extension|--prompt|--recode|--encoding|\
        -!(-*)[LmerRE])
            return
            ;;
    esac

    $split && return

    if [[ $cur == -* ]]; then
        local opts=$(_parse_help "$1" -h)
        COMPREPLY=( $(compgen -W '${opts:-$(_parse_usage "$1")}' -- "$cur") )
        [[ $COMPREPLY == *= ]] && compopt -o nospace
        return
    fi

    # file based completion if parameter looks like a path
    if [[ "$cur" == @(*/|[.~])* ]]; then
        _filedir "$manext"
        return
    fi

    local manpath=$(manpath 2>/dev/null || command man -w 2>/dev/null)
    [[ -z $manpath ]] && manpath="/usr/share/man:/usr/local/share/man"

    # determine manual section to search
    local sect
    [[ "$prev" == $mansect ]] && sect=$prev || sect='*'

    _expand || return

    manpath=$manpath:
    if [[ -n $cur ]]; then
        manpath="${manpath//://*man$sect/$cur* } ${manpath//://*cat$sect/$cur* }"
    else
        manpath="${manpath//://*man$sect/ } ${manpath//://*cat$sect/ }"
    fi

    local IFS=$' \t\n' reset=$(shopt -p failglob); shopt -u failglob
    # redirect stderr for when path doesn't exist
    COMPREPLY=( $(eval command ls "$manpath" 2>/dev/null) )
    $reset

    # weed out directory path names and paths to man pages
    COMPREPLY=( ${COMPREPLY[@]##*/?(:)} )
    # strip suffix from man pages
    COMPREPLY=( ${COMPREPLY[@]%$comprsuffix} )
    COMPREPLY=( $(compgen -W '${COMPREPLY[@]%.*}' -- "${cur//\\\\/}") )

    if [[ "$prev" != $mansect ]]; then
        # File based completion for the rest, prepending ./ if needed
        # (man 1.6f needs that for man pages in current dir)
        local i start=${#COMPREPLY[@]}
        _filedir "$manext"
        for (( i=$start; i < ${#COMPREPLY[@]}; i++ )); do
            [[ ${COMPREPLY[i]} == */* ]] || COMPREPLY[i]=./${COMPREPLY[i]}
        done
    fi

    __ltrim_colon_completions "$cur"
} &&
complete -F _man man apropos whatis

# ex: filetype=sh
Private