Add support for sessions -d ranges

bug/bundler_fix
William Vu 2014-10-28 03:07:46 -05:00
parent 36c85b7150
commit 5547890002
No known key found for this signature in database
GPG Key ID: E761DCB4C1629024
1 changed files with 9 additions and 6 deletions

View File

@ -1733,13 +1733,16 @@ class Core
end
when 'detach'
if ((session = framework.sessions.get(sid)))
print_status("Detaching session #{sid}")
if (session.interactive?)
session.detach()
session_list = build_sessions_array(sid)
print_status("Detaching the following session(s): #{session_list.join(', ')}")
session_list.each do |sess|
session = framework.sessions.get(sess)
if session
print_status("Detaching session #{sess}")
session.detach
else
print_error("Invalid session identifier: #{sess}")
end
else
print_error("Invalid session identifier: #{sid}")
end
when 'interact'