{"id":22438,"date":"2018-08-13T16:08:26","date_gmt":"2018-08-13T20:08:26","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=22438"},"modified":"2018-08-13T16:08:26","modified_gmt":"2018-08-13T20:08:26","slug":"henriks-favorite-command-line-shortcuts","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2018\/08\/13\/henriks-favorite-command-line-shortcuts\/","title":{"rendered":"Henrik&rsquo;s Favorite Command-Line Shortcuts"},"content":{"rendered":"<p><a href=\"https:\/\/henrikwarne.com\/2018\/08\/11\/my-favorite-command-line-shortcuts\/\">Henrik Warne<\/a> (<a href=\"https:\/\/www.reddit.com\/r\/programming\/comments\/96oibw\/my_favorite_commandline_shortcuts\/\">Reddit<\/a>):<\/p>\n<blockquote cite=\"https:\/\/henrikwarne.com\/2018\/08\/11\/my-favorite-command-line-shortcuts\/\">\n<p>Most people I have worked with use both arrow-up and ctrl-r when repeating commands. However, very few are familiar with escape-dot and repeating commands from the history list. Since I use all four ways very frequently, I thought I would write a post to spread the word.<\/p>\n<\/blockquote>\n\n<p>If you have &ldquo;Use Option as Meta key&rdquo; checked in Terminal&rsquo;s preferences, you can also use Option-Period, which is much easier to type, to insert the last argument of the previous command.<\/p>\n\n<p>The <code>p<\/code> modifier to <a href=\"https:\/\/www.digitalocean.com\/community\/tutorials\/how-to-use-bash-history-commands-and-expansions-on-a-linux-vps\">prevent executing<\/a> the command recalled from the history was new to me.<\/p>\n\n<p>Previously: <a href=\"https:\/\/mjtsai.com\/blog\/2018\/02\/01\/things-i-wish-id-known-about-bash\/\">Things I Wish I&rsquo;d Known About Bash<\/a>, <a href=\"https:\/\/mjtsai.com\/blog\/2016\/09\/26\/mac-terminal-tips\/\">Mac Terminal Tips<\/a>, <a href=\"https:\/\/mjtsai.com\/blog\/2014\/09\/03\/craigs-terminal-tips\/\">Craig&rsquo;s Terminal Tips<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Henrik Warne (Reddit): Most people I have worked with use both arrow-up and ctrl-r when repeating commands. However, very few are familiar with escape-dot and repeating commands from the history list. Since I use all four ways very frequently, I thought I would write a post to spread the word. If you have &ldquo;Use Option [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2018-08-13T20:08:28Z","apple_news_api_id":"6fc1ed7e-5b13-4ea7-8eaa-8dccfab13a24","apple_news_api_modified_at":"2018-08-13T20:08:28Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/Ab8HtflsTTqeOqo3M-rE6JA","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[],"tags":[767,30,1529,318,163],"class_list":["post-22438","post","type-post","status-publish","format-standard","hentry","tag-bash","tag-mac","tag-macos-10-13","tag-terminal","tag-unix"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/22438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=22438"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/22438\/revisions"}],"predecessor-version":[{"id":22439,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/22438\/revisions\/22439"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=22438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=22438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=22438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}