From dfb4ec804a099b539c91e5643090d8183885e71c Mon Sep 17 00:00:00 2001 From: Pierre Fenoll Date: Tue, 3 Dec 2013 12:55:38 +0000 Subject: Shell: expand 0-arity functions all the way to closing parenthesis `erl` has tab completion for modules' exported functions but expands only up to the opening paren. This commit closes that opening paren in case the function is of arity zero and there is no other function with the same name. It browses the lists of matches (a 2nd time) for Arity, on complete match and then decides what to append. --- lib/stdlib/test/expand_test.erl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/stdlib/test/expand_test.erl') diff --git a/lib/stdlib/test/expand_test.erl b/lib/stdlib/test/expand_test.erl index 63e4bc3aa0..b9db32c352 100644 --- a/lib/stdlib/test/expand_test.erl +++ b/lib/stdlib/test/expand_test.erl @@ -20,7 +20,8 @@ -export([a_fun_name/1, a_less_fun_name/1, - b_comes_after_a/1]). + b_comes_after_a/1, + expand0arity_entirely/0]). a_fun_name(X) -> X. @@ -30,3 +31,6 @@ a_less_fun_name(X) -> b_comes_after_a(X) -> X. + +expand0arity_entirely () -> + ok. -- cgit v1.2.3