Your message dated Sat, 11 Jan 2025 20:26:14 -0800
with message-id <20250111202614.11bec9f7@tigre>
and subject line 
has caused the Debian Bug report #575527,
regarding bash-completion: completion for Scilab
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
575527: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=575527
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: bash-completion
Severity: wishlist
Tags: patch

Hello,

Could you consider the inclusion of the completion on Scilab ?
It is my first bash_completion script, please forgive my mistakes.

Thanks
Sylvestre
PS: Do I also need to report upstream ?

# Scilab completion
# Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
# Copyright (C) DIGITEO - 2010 - Sylvestre Ledru
# This file must be used under the terms of the CeCILL.
# This source file is licensed as described in the file COPYING, which
# you should have received as part of this distribution.  The terms
# are also available at    
# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt

_scilab()
{
    local cur prev options
    COMPREPLY=()
    cur=${COMP_WORDS[COMP_CWORD]}
    prev=${COMP_WORDS[COMP_CWORD-1]}

    # List all options. Note that 
    options='-ns -nb -nw -nwni -nogui -debug -debug-kdbg -d -display -profiling 
-profiling-visu -l -mem -version -e -f -nouserstartup -args -mem -h --help'

    # Loop on the arguments to manage conflicting options
    for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
        #exclude some mutually exclusive options
        [[ ${COMP_WORDS[i]} == '-nwni' ]] && options=${options/-nw}
        [[ ${COMP_WORDS[i]} == '-nw' ]] && options=${options/-nwni}
        [[ ${COMP_WORDS[i]} == '-e' ]] && options=${options/-f}
    done
    
    case "$1" in
         *scilab-cli*)
                # Option -nw is not available
                options=${options/-nw}
        ;;
    esac

    case $prev in
        -f)
                _filedir '@(sci|sce|SCI|SCE|tst|TST)'
                return 0
            ;;
        -e|-l|-d|-display|-mem)
                cur=${cur#[\"\']}
                eqext='='
            ;;
        
        *)
            COMPREPLY=( $( compgen -W "$options" | grep "^$cur" ) )
            ;;
    esac

    return 0
}
complete -F _scilab $filenames scilab scilab-cli scilab-adv-cli



--- End Message ---
--- Begin Message ---
Package scilab-cli provides completions

--- End Message ---

Reply via email to