diff options
author | Hans Nilsson <[email protected]> | 2018-03-23 10:28:25 +0100 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2018-03-23 10:28:25 +0100 |
commit | 76ae52ff21f2da1b70b3e9999c81cdbf61d8c595 (patch) | |
tree | 99c64987513f585e61beba15af6e05cfba6bda2d /lib/ssh/src/ssh_options.erl | |
parent | 8d8f9477590628999663da7e9ed0a4941085a861 (diff) | |
parent | 3eced27f96d87eac1fc90325d7030167805309a1 (diff) | |
download | otp-76ae52ff21f2da1b70b3e9999c81cdbf61d8c595.tar.gz otp-76ae52ff21f2da1b70b3e9999c81cdbf61d8c595.tar.bz2 otp-76ae52ff21f2da1b70b3e9999c81cdbf61d8c595.zip |
Merge branch 'hans/ssh/exec_fun_mfa/OTP-14851'
* hans/ssh/exec_fun_mfa/OTP-14851:
ssh: Document the exec option
ssh: Simplification of using fun:s as exec subsystems
Diffstat (limited to 'lib/ssh/src/ssh_options.erl')
-rw-r--r-- | lib/ssh/src/ssh_options.erl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/ssh/src/ssh_options.erl b/lib/ssh/src/ssh_options.erl index 1e10f72956..c05293d1ae 100644 --- a/lib/ssh/src/ssh_options.erl +++ b/lib/ssh/src/ssh_options.erl @@ -275,10 +275,12 @@ default(server) -> class => user_options }, - {exec, def} => % FIXME: need some archeology.... + {exec, def} => #{default => undefined, - chk => fun({M,F,_}) -> is_atom(M) andalso is_atom(F); - (V) -> is_function(V) + chk => fun({direct, V}) -> check_function1(V) orelse check_function2(V) orelse check_function3(V); + %% Compatibility (undocumented): + ({M,F,A}) -> is_atom(M) andalso is_atom(F) andalso is_list(A); + (V) -> check_function1(V) orelse check_function2(V) orelse check_function3(V) end, class => user_options }, |