Rename words_to_urls() to urlize_words(), NFCI. - plumb - Open certain URL patterns with an ad-hoc opener (plumber)
(HTM) hg clone https://bitbucket.org/iamleot/plumb
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) changeset ad79b08f63cc509593258d792d5b20728322019c
(DIR) parent 33e8f9e2b0a1c60b3a2dab8caaf9cfac71118a70
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Sun, 1 Apr 2018 02:07:27
Rename words_to_urls() to urlize_words(), NFCI.
- Rename words_to_urls() function to urlize_words() to - hopefully - better
reflects what it does.
- Improve the comments about urlize_words() and urlize() to points out that
they respectively handle patterns with and without blanks.
Diffstat:
dplumb | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff -r 33e8f9e2b0a1 -r ad79b08f63cc dplumb
--- a/dplumb Sun Apr 01 02:00:23 2018 +0200
+++ b/dplumb Sun Apr 01 02:07:27 2018 +0200
@@ -53,9 +53,9 @@
#
-# Parse words with blanks and urlize them without any blanks.
+# Convert predefined patterns with blanks to user-defined URLs.
#
-words_to_urls()
+urlize_words()
{
sed \
@@ -64,7 +64,7 @@
#
-# Convert predefined patterns to user-defined URLs.
+# Convert predefined patterns without blanks to user-defined URLs.
#
urlize()
{
@@ -134,14 +134,14 @@
if [ "$dplumb_list" = "yes" ]; then
lines |
- words_to_urls |
+ urlize_words |
one_word_per_line |
urlize |
extract_urls
else
plumb "$(
lines |
- words_to_urls |
+ urlize_words |
one_word_per_line |
urlize |
extract_urls |