diff options
author | Yigit Sever | 2021-11-18 19:47:43 +0300 |
---|---|---|
committer | Yigit Sever | 2021-11-18 19:47:43 +0300 |
commit | b8523b178794d7bcc71ae80c306c28b377e978e0 (patch) | |
tree | 7ee15bda8459e898f1ebefac47f0b8bbd69821f4 /.local/bin | |
parent | febc6f258b11d0342a64921b95ef64080347a596 (diff) | |
download | dotfiles-b8523b178794d7bcc71ae80c306c28b377e978e0.tar.gz dotfiles-b8523b178794d7bcc71ae80c306c28b377e978e0.tar.bz2 dotfiles-b8523b178794d7bcc71ae80c306c28b377e978e0.zip |
cmdfmt: textwidth may be 0 from vim
Diffstat (limited to '.local/bin')
-rwxr-xr-x | .local/bin/cmdfmt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/.local/bin/cmdfmt b/.local/bin/cmdfmt index 37218d7..634e9c6 100755 --- a/.local/bin/cmdfmt +++ b/.local/bin/cmdfmt | |||
@@ -3,6 +3,11 @@ | |||
3 | use strict; | 3 | use strict; |
4 | 4 | ||
5 | my $textwidth = $ARGV[0] // 80; | 5 | my $textwidth = $ARGV[0] // 80; |
6 | |||
7 | if ($textwidth == 0) { | ||
8 | $textwidth = 80; | ||
9 | } | ||
10 | |||
6 | # TODO: get tabstop from vim as well <17-11-21, yigit> # | 11 | # TODO: get tabstop from vim as well <17-11-21, yigit> # |
7 | my $tabstop = ' ' x 4; | 12 | my $tabstop = ' ' x 4; |
8 | 13 | ||