{"id":258,"date":"2012-02-01T00:11:00","date_gmt":"2012-02-01T06:11:00","guid":{"rendered":"http:\/\/www.pervasivecode.com\/blog\/?p=258"},"modified":"2021-09-26T15:13:04","modified_gmt":"2021-09-26T23:13:04","slug":"patch-to-make-ubuntus-gnu-screen-bash-completion-work-better","status":"publish","type":"post","link":"http:\/\/www.pervasivecode.com\/blog\/2012\/02\/01\/patch-to-make-ubuntus-gnu-screen-bash-completion-work-better\/","title":{"rendered":"Patch to make Ubuntu&#8217;s GNU Screen bash completion work better"},"content":{"rendered":"<p>If you make a screen with a name using <code>screen -S foo<\/code> and then try and reattach later using <code>screen -R f[tab]<\/code> it doesn&#8217;t work. It only completes the full name as seen in <code>screen -ls<\/code> which starts with the PID of the detached screen, like <code>9972.foo<\/code>. Not very convenient. Why can&#8217;t it just complete using the name you gave it?<\/p>\n<p><a href=\"http:\/\/alioth.debian.org\/tracker\/?func=detail&#038;atid=413095&#038;aid=311540&#038;group_id=100114\">Someone else solved this problem three years ago<\/a> but nobody accepted their patch, and now \/etc\/bash_completion.d\/screen has been overhauled and the patch no longer applies.<\/p>\n<p>I updated the patch so it works and <a href=\"https:\/\/bugs.launchpad.net\/ubuntu\/+source\/bash-completion\/+bug\/924676\">resubmitted it to Ubuntu<\/a>.<\/p>\n<p>If you don&#8217;t wanna wait, grab the code from <a href=\"https:\/\/gist.github.com\/1715383\">this gist<\/a> and do this:<\/p>\n<pre>sudo patch \/etc\/bash_completion.d\/screen screen.patch<\/pre>\n<p>This will probably work on Debian too since that&#8217;s where the completion script came from.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you make a screen with a name using screen -S foo and then try and reattach later using screen -R f[tab] it doesn&#8217;t work. It only completes the full name as seen in screen -ls which starts with the PID of the detached screen, like 9972.foo. Not very convenient. Why can&#8217;t it just complete &hellip; <a href=\"http:\/\/www.pervasivecode.com\/blog\/2012\/02\/01\/patch-to-make-ubuntus-gnu-screen-bash-completion-work-better\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Patch to make Ubuntu&#8217;s GNU Screen bash completion work better&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,3],"tags":[],"class_list":["post-258","post","type-post","status-publish","format-standard","hentry","category-tools","category-ubuntu"],"_links":{"self":[{"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/posts\/258"}],"collection":[{"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/comments?post=258"}],"version-history":[{"count":16,"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/posts\/258\/revisions"}],"predecessor-version":[{"id":332,"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/posts\/258\/revisions\/332"}],"wp:attachment":[{"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/media?parent=258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/categories?post=258"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.pervasivecode.com\/blog\/wp-json\/wp\/v2\/tags?post=258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}