diff --git a/README.md b/README.md index efea1e7..f602562 100644 --- a/README.md +++ b/README.md @@ -88,8 +88,8 @@ Who is who in **bin** directory: - `h+ SYMBOL` draw a pretty heading - `hg+ MESSAGE` hg: commit and push to master - `lower` convert selection to lowercase +- `lstrip` remove leading whitespace - `search` search with The Silver Searcher -- `s-` remove leading whitespace - `s2t N_SPACES` spaces to tabs (default: 4 spaces to 1 tab) - `t2s N_SPACES` tabs to spaces (default: 1 tab to 4 spaces) - `t+` add tab diff --git a/bin/lstrip b/bin/lstrip new file mode 100755 index 0000000..cfc54fd --- /dev/null +++ b/bin/lstrip @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +# macOS (BSD) flavor of sed +sed -E 's/^[[:space:]]+//' diff --git a/bin/s- b/bin/s- deleted file mode 100755 index 992aa64..0000000 --- a/bin/s- +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env perl - -while (<>) { - if ($_ =~ m/^\s+$/) { - print "\n"; - } else { - $_ =~ s/^\s+//; - print $_; - } -}