diff options
| author | Jakob Kaivo <jkk@ung.org> | 2018-10-08 12:31:22 -0400 |
|---|---|---|
| committer | Jakob Kaivo <jkk@ung.org> | 2018-10-08 12:31:22 -0400 |
| commit | c96a1c7f9cea82470a99691d2832c6599c8eff10 (patch) | |
| tree | ea286319deba02ff13f6daa1dbf0e4cb09530dc5 /color-ls.awk | |
| parent | 0561efd31a7161d611bb9bcd6ff16b27ba32e14d (diff) | |
move some variable processing to BEGIN
Diffstat (limited to 'color-ls.awk')
| -rwxr-xr-x | color-ls.awk | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/color-ls.awk b/color-ls.awk index fc5855c..e19c77a 100755 --- a/color-ls.awk +++ b/color-ls.awk @@ -22,6 +22,14 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +BEGIN { + long = 0; + widest = 0; + if (output == "l" || output == "o" || output == "n" || output == "g") { + long = 1; + } +} + function columns_down() { widest++; column = 0; |
