From c96a1c7f9cea82470a99691d2832c6599c8eff10 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Mon, 8 Oct 2018 12:31:22 -0400 Subject: move some variable processing to BEGIN --- color-ls.awk | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'color-ls.awk') 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; -- cgit v1.2.1