{"id":6512,"date":"2017-08-22T12:58:00","date_gmt":"2017-08-22T16:58:00","guid":{"rendered":"http:\/\/irreal.org\/blog\/?p=6512"},"modified":"2017-08-22T12:58:16","modified_gmt":"2017-08-22T16:58:16","slug":"ivy-initial-input-string","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=6512","title":{"rendered":"Ivy Initial Input String"},"content":{"rendered":"<p> If you&rsquo;re an Ivy user\u2014and you should be\u2014you&rsquo;ve probably noticed that sometimes the Ivy prompt will have an initial &ldquo;^&rdquo; so that the search will be anchored at the beginning of line. This happens depending on the command that called the <code>ivy-read<\/code> routine. If Ivy guesses wrong, you can always remove the &ldquo;^&rdquo; or add one. <\/p>\n<p> Sometimes, though, it always guesses wrong for your particular work flow. I&rsquo;ve just learned from <a href=\"https:\/\/www.reddit.com\/r\/emacs\/comments\/6v3vkk\/problem_with_ivy_default_reg_exp\/\">this Emacs subreddit question<\/a> that you can, to an extent, control when the &ldquo;^&rdquo; is appended to the prompt. Actually, you can specify any string to prepend. <\/p>\n<p> The decision as to what to append is controlled by the <code>ivy-initial-inputs-alist<\/code>. Again, you can easily correct the default action at the time of the call so unless you have a situation where Ivy is always guessing wrong, it&rsquo;s probably not worth changing the default value of <code>ivy-initial-inputs-alist<\/code>. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you&rsquo;re an Ivy user\u2014and you should be\u2014you&rsquo;ve probably noticed that sometimes the Ivy prompt will have an initial &ldquo;^&rdquo; so that the search will be anchored at the beginning of line. This happens depending on the command that called &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=6512\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[18],"class_list":["post-6512","post","type-post","status-publish","format-standard","hentry","category-general","tag-emacs"],"_links":{"self":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6512","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6512"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6512\/revisions"}],"predecessor-version":[{"id":6513,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/6512\/revisions\/6513"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}