From e4fe946621d824fe04f5c8a8f4f774342b53df40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sat, 18 Feb 2012 10:12:02 +0200 Subject: su: Fix long option handling. --- completions/su | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/completions/su b/completions/su index df912306..2c6254d3 100644 --- a/completions/su +++ b/completions/su @@ -7,8 +7,8 @@ fi _su() # linux-specific completion { - local cur prev words cword - _init_completion || return + local cur prev words cword split + _init_completion -s || return case "$prev" in -s|--shell) @@ -23,6 +23,8 @@ _su() # linux-specific completion ;; esac + $split && return + if [[ "$cur" == -* ]]; then COMPREPLY=( $( compgen -W '$( _parse_help "$1" --help )' -- "$cur" ) ) [[ $COMPREPLY == *= ]] && compopt -o nospace -- cgit v1.2.1