/
/
etc
/
bash_completion.d
EDITOR
/etc/bash_completion.d/scl
SAVE
CLOSE
# main function bound to scl command _scl() { local cur actions cur_action collections COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" actions="enable run load unload list-collections list-packages man register deregister --help" collections=`scl list-collections` # Complete action names if ((COMP_CWORD == 1)); then COMPREPLY=( $(compgen -W "${actions}" -- ${cur}) ) return 0; fi # If there is command or separator in arguments then stop completition if ((COMP_CWORD > 3)); then for word in "${COMP_WORDS[@]}"; do if [[ ${word} == \'* || ${word} == \"* || ${word} == "--" ]] ; then return 0 fi done fi # Complete one or none action argument if ((COMP_CWORD >= 2)); then cur_action="${COMP_WORDS[1]}" case "$cur_action" in # No argument list-collections|list-enabled|--help) return 0 ;; # Argument is collection name list-packages|man) if ((COMP_CWORD == 2)); then COMPREPLY=( $(compgen -W "$collections" -- ${cur}) ) fi return 0 ;; # Argument is collection name or "-f" or "--force" deregister) if ((COMP_CWORD == 2)); then COMPREPLY=( $(compgen -W "$collections --force -f" -- ${cur})) fi if [ "$COMP_CWORD" -eq 3 -a "(" "${COMP_WORDS[2]}" == "--force" -o "${COMP_WORDS[2]}" == "-f" ")" ]; then COMPREPLY=( $(compgen -W "$collections" -- ${cur})) fi return 0 ;; # Argument is directory register) compopt -o plusdirs if ((COMP_CWORD == 2)); then COMPREPLY=( $(compgen -A directory -- ${cur}) ) fi return 0 ;; # Arguments are collections or "-x" or "--exec" run|enable) if ((COMP_CWORD == 2)); then COMPREPLY=( $(compgen -W "$collections -x --exec" -- ${cur}) ) else COMPREPLY=( $(compgen -W "$collections" -- ${cur}) ) fi return 0 ;; # Arguments are collections load|unload) COMPREPLY=( $(compgen -W "$collections" -- ${cur}) ) return 0 ;; *) ;; esac fi } # bind the scl command to the _scl function for completion complete -F _scl scl
Ln 1, Col 1
FORMAT
WRAP
SAVE FILE
ONLINE
bash_completion.d
1 items
20:03:22
TERMINAL FM
×
NAVIGATION
Root
Parent Dir
Refresh
ACTIONS
New Folder
New File
Upload Files
New Symlink
SELECTION
Select All
Deselect
Delete Selected
NEW FOLDER
FOLDER NAME
NEW FILE
FILE NAME
UPLOAD FILES
Click to browse or drag & drop files
No files selected
RENAME
CURRENT NAME
NEW NAME
COPY FILE
SOURCE
DESTINATION NAME
CHMOD
FILE / FOLDER
CURRENT PERMISSIONS
NEW MODE (octal)
755 (rwxr-xr-x)
644 (rw-r--r--)
777 (rwxrwxrwx)
600 (rw-------)
444 (r--r--r--)
CONFIRM DELETE
You are about to delete:
This action is irreversible. All contents will be permanently removed.
NEW SYMLINK
LINK TARGET (path)
LINK NAME
Edit
Preview
Download
Rename
Copy
Chmod
Delete