diff options
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Core/_description | 2 | ||||
-rw-r--r-- | Completion/Core/_files | 20 | ||||
-rw-r--r-- | Completion/Core/_main_complete | 4 | ||||
-rw-r--r-- | Completion/Core/compinit | 13 |
4 files changed, 29 insertions, 10 deletions
diff --git a/Completion/Core/_description b/Completion/Core/_description index 54518e49f..0d28284ed 100644 --- a/Completion/Core/_description +++ b/Completion/Core/_description @@ -14,6 +14,8 @@ fi _lastdescr=( "$_lastdescr[@]" "$3" ) +_setup "$1" + _style -s descriptions format format _style -s "$1" group-name gname && [[ -z "$gname" ]] && gname="$1" diff --git a/Completion/Core/_files b/Completion/Core/_files index 9c5b45693..32d78dba1 100644 --- a/Completion/Core/_files +++ b/Completion/Core/_files @@ -27,19 +27,31 @@ esac while _tags; do if _requested all-files; then - (( $#group )) && group[2]=all-files + if (( $#group )); then + group[2]=all-files + _setup all-files + fi _path_files "$opts[@]" -f return elif _requested directories; then if _requested globbed-files; then - (( $#group )) && group[2]=globbed-files + if (( $#group )); then + group[2]=globbed-files + _setup globbed-files + fi _path_files "$opts[@]" -/g "$type" && return 0 else - (( $#group )) && group[2]=directories + if (( $#group )); then + group[2]=directories + _setup directories + fi _path_files "$opts[@]" -/ && return 0 fi elif _requested globbed-files; then - (( $#group )) && group[2]=globbed-files + if (( $#group )); then + group[2]=globbed-files + _setup globbed-files + fi _path_files "$opts[@]" -g "$type" && return 0 fi done diff --git a/Completion/Core/_main_complete b/Completion/Core/_main_complete index c23ce41cd..4dd3bd218 100644 --- a/Completion/Core/_main_complete +++ b/Completion/Core/_main_complete @@ -39,6 +39,10 @@ elif [[ "$PREFIX" != */* && "$PREFIX[1]" = '~' ]]; then compstate[context]=tilde fi +# Initial setup. + +_setup default + # Get the names of the completers to use in the positional parameters. if (( ! $# )); then diff --git a/Completion/Core/compinit b/Completion/Core/compinit index b313edede..06586cdc4 100644 --- a/Completion/Core/compinit +++ b/Completion/Core/compinit @@ -487,12 +487,13 @@ compstyle() { # Default styles. This should be executed conditionally somehow. -compstyle '*' verbose 'yes' -compstyle '*' prefix-needed 'yes' -compstyle '*' prefix-hidden 'no' -compstyle ':correct' accept '2n' -compstyle ':correct' prompt 'correct to:' -compstyle '*' completer '_complete' +compstyle '*' verbose 'yes' +compstyle '*' prefix-needed 'yes' +compstyle '*' prefix-hidden 'no' +compstyle ':correct' accept '2n' +compstyle ':correct' prompt 'correct to:' +compstyle '*' completer '_complete' +compstyle '*:default' list-colors no=0 fi=0 di=0 ln=0 pi=0 so=0 bd=0 cd=0 ex=0 # Now we automatically make the definition files autoloaded. |