s- becomes lstrip
This commit is contained in:
parent
1811d3351c
commit
950e6f45ce
3 changed files with 5 additions and 11 deletions
|
|
@ -88,8 +88,8 @@ Who is who in **bin** directory:
|
||||||
- `h+ SYMBOL` draw a pretty heading
|
- `h+ SYMBOL` draw a pretty heading
|
||||||
- `hg+ MESSAGE` hg: commit and push to master
|
- `hg+ MESSAGE` hg: commit and push to master
|
||||||
- `lower` convert selection to lowercase
|
- `lower` convert selection to lowercase
|
||||||
|
- `lstrip` remove leading whitespace
|
||||||
- `search` search with The Silver Searcher
|
- `search` search with The Silver Searcher
|
||||||
- `s-` remove leading whitespace
|
|
||||||
- `s2t N_SPACES` spaces to tabs (default: 4 spaces to 1 tab)
|
- `s2t N_SPACES` spaces to tabs (default: 4 spaces to 1 tab)
|
||||||
- `t2s N_SPACES` tabs to spaces (default: 1 tab to 4 spaces)
|
- `t2s N_SPACES` tabs to spaces (default: 1 tab to 4 spaces)
|
||||||
- `t+` add tab
|
- `t+` add tab
|
||||||
|
|
|
||||||
4
bin/lstrip
Executable file
4
bin/lstrip
Executable file
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# macOS (BSD) flavor of sed
|
||||||
|
sed -E 's/^[[:space:]]+//'
|
||||||
10
bin/s-
10
bin/s-
|
|
@ -1,10 +0,0 @@
|
||||||
#!/usr/bin/env perl
|
|
||||||
|
|
||||||
while (<>) {
|
|
||||||
if ($_ =~ m/^\s+$/) {
|
|
||||||
print "\n";
|
|
||||||
} else {
|
|
||||||
$_ =~ s/^\s+//;
|
|
||||||
print $_;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue