From fbc5d0a5af042bde489d68894c04213003ed6292 Mon Sep 17 00:00:00 2001 From: John D Pell Date: Wed, 26 Jan 2022 10:56:59 -0800 Subject: [PATCH] lib/p4helpers: `shfmt` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit My apologies to future `git blame` hunters ♥ --- clean_files.txt | 1 + themes/p4helpers.theme.bash | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/clean_files.txt b/clean_files.txt index 54180c19..26b059da 100644 --- a/clean_files.txt +++ b/clean_files.txt @@ -160,6 +160,7 @@ themes/easy themes/essential themes/modern themes/norbu +themes/p4helpers.theme.bash themes/pete themes/powerline themes/pure diff --git a/themes/p4helpers.theme.bash b/themes/p4helpers.theme.bash index 27a777ac..30b520cc 100644 --- a/themes/p4helpers.theme.bash +++ b/themes/p4helpers.theme.bash @@ -1,18 +1,18 @@ -#!/usr/bin/env bash +# shellcheck shell=bash function _p4-opened { - timeout 2.0s p4 opened -s 2> /dev/null + timeout 2.0s p4 opened -s 2> /dev/null } function _p4-opened-counts { - # Return the following counts seperated by tabs: - # - count of opened files - # - count of pending changesets (other than defaults) - # - count of files in the default changeset - # - count of opened files in add mode - # - count of opened files in edit mode - # - count of opened files in delete mode - _p4-opened | awk ' + # Return the following counts seperated by tabs: + # - count of opened files + # - count of pending changesets (other than defaults) + # - count of files in the default changeset + # - count of opened files in add mode + # - count of opened files in edit mode + # - count of opened files in delete mode + _p4-opened | awk ' BEGIN { opened=0; type_array["edit"]=0;