Skip to content

Commit

Permalink
Use selected text for URL (instead of clipboard content)
Browse files Browse the repository at this point in the history
  • Loading branch information
noniq committed Jul 24, 2018
1 parent fda8d10 commit 67f9564
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Commands/Wrap Selection as Link.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def make_link(text)
end
end
url = make_link %x{pbpaste}.strip
input = STDIN.read
url = make_link input.strip
title = nil
if url =~ /^https?:\/\// and url != 'http://example.com/'
Expand All @@ -51,7 +51,6 @@ if url =~ /^https?:\/\// and url != 'http://example.com/'
end
end
input = STDIN.read
print ERB.new(ENV['TM_LINK_FORMAT']).result
</string>
<key>fallbackInput</key>
Expand Down

0 comments on commit 67f9564

Please sign in to comment.