Fix indentation.

This commit is contained in:
Ville Skyttä 2009-10-18 21:38:41 +03:00
parent 098dcd80b6
commit 5df89c7cff

View File

@ -64,33 +64,33 @@ _ri()
# integrated ri from Ruby 1.9 # integrated ri from Ruby 1.9
classes=( $( ri -c | ruby -ne 'if /^\s*$/..$stdin.eof then \ classes=( $( ri -c | ruby -ne 'if /^\s*$/..$stdin.eof then \
if /, [A-Z]+/ then print; end; end' ) ) if /, [A-Z]+/ then print; end; end' ) )
elif [ "$ri_version" = "ri 1.8a" ]; then elif [ "$ri_version" = "ri 1.8a" ]; then
classes=( $( ruby -W0 $ri_path | \ classes=( $( ruby -W0 $ri_path | \
ruby -ne 'if /^'"'"'ri'"'"' has/..$stdin.eof then \ ruby -ne 'if /^'"'"'ri'"'"' has/..$stdin.eof then \
if /^ .*[A-Z]/ then print; end; end' )) if /^ .*[A-Z]/ then print; end; end' ))
else else
classes=( $( ruby -W0 $ri_path | \ classes=( $( ruby -W0 $ri_path | \
ruby -ne 'if /^I have/..$stdin.eof then \ ruby -ne 'if /^I have/..$stdin.eof then \
if /^ .*[A-Z]/ then print; end; end' )) if /^ .*[A-Z]/ then print; end; end' ))
fi fi
COMPREPLY=( $( compgen -W '${classes[@]}' -- "$cur" ) ) COMPREPLY=( $( compgen -W '${classes[@]}' -- "$cur" ) )
if [[ "$cur" == [A-Z]* ]]; then if [[ "$cur" == [A-Z]* ]]; then
# we're completing on class or module alone # we're completing on class or module alone
return 0 return 0
fi fi
# we're completing on methods # we're completing on methods
method=$cur method=$cur
ri_get_methods ri_get_methods
} }
complete -F _ri ri complete -F _ri ri
} }
# Local variables: # Local variables:
# mode: shell-script # mode: shell-script
# sh-basic-offset: 4 # sh-basic-offset: 4
# sh-indent-comment: t # sh-indent-comment: t
# indent-tabs-mode: nil # indent-tabs-mode: nil
# End: # End:
# ex: ts=4 sw=4 et filetype=sh # ex: ts=4 sw=4 et filetype=sh