diff options
author | Hans Nilsson <[email protected]> | 2017-02-16 14:48:04 +0100 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2017-03-02 12:03:51 +0100 |
commit | 89a829f32d855610b0bc0c3ea53e7c05454b7a24 (patch) | |
tree | 14d887fc3df9515b2624671963a30886921c835e /lib/ssh/src/ssh_cli.erl | |
parent | cf732330c011fb28f58c7e4c043381eac352a9fb (diff) | |
download | otp-89a829f32d855610b0bc0c3ea53e7c05454b7a24.tar.gz otp-89a829f32d855610b0bc0c3ea53e7c05454b7a24.tar.bz2 otp-89a829f32d855610b0bc0c3ea53e7c05454b7a24.zip |
ssh: Initial commit of option handling changes
Diffstat (limited to 'lib/ssh/src/ssh_cli.erl')
-rw-r--r-- | lib/ssh/src/ssh_cli.erl | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/ssh/src/ssh_cli.erl b/lib/ssh/src/ssh_cli.erl index 6f8c050486..4c4f61e036 100644 --- a/lib/ssh/src/ssh_cli.erl +++ b/lib/ssh/src/ssh_cli.erl @@ -499,14 +499,12 @@ start_shell(ConnectionHandler, State) -> [peer, user]), ShellFun = case is_function(Shell) of true -> - User = - proplists:get_value(user, ConnectionInfo), + User = proplists:get_value(user, ConnectionInfo), case erlang:fun_info(Shell, arity) of {arity, 1} -> fun() -> Shell(User) end; {arity, 2} -> - {_, PeerAddr} = - proplists:get_value(peer, ConnectionInfo), + {_, PeerAddr} = proplists:get_value(peer, ConnectionInfo), fun() -> Shell(User, PeerAddr) end; _ -> Shell @@ -525,8 +523,7 @@ start_shell(ConnectionHandler, Cmd, #state{exec=Shell} = State) when is_function ConnectionInfo = ssh_connection_handler:connection_info(ConnectionHandler, [peer, user]), - User = - proplists:get_value(user, ConnectionInfo), + User = proplists:get_value(user, ConnectionInfo), ShellFun = case erlang:fun_info(Shell, arity) of {arity, 1} -> @@ -534,8 +531,7 @@ start_shell(ConnectionHandler, Cmd, #state{exec=Shell} = State) when is_function {arity, 2} -> fun() -> Shell(Cmd, User) end; {arity, 3} -> - {_, PeerAddr} = - proplists:get_value(peer, ConnectionInfo), + {_, PeerAddr} = proplists:get_value(peer, ConnectionInfo), fun() -> Shell(Cmd, User, PeerAddr) end; _ -> Shell |