enable make style-all doing fish scripts

I had disabled having `make style-all` restyling fish scripts because a
majority of them did not conform to the style enforced by `fish_indent`.
I recently restyled most of the fish scripts with the exception of the
completion scripts. So this re-enables restyling all scripts with the
exception of completion scripts.
This commit is contained in:
Kurtis Rader 2016-12-03 20:36:47 -08:00
parent 9443a415bf
commit 42eaacd3a1
3 changed files with 145 additions and 141 deletions

View file

@ -30,12 +30,10 @@ if test $all = yes
exit 1 exit 1
end end
set c_files src/*.h src/*.cpp set c_files src/*.h src/*.cpp
# For now we don't restyle all the fish scripts. That's because `fish_indent` still has some # For now we don't restyle all fish scripts other than completion scripts. That's because people
# problems with its output that require manual intervention. Not to mention that very few of the # really like to vertically align the elements of the `complete` command and fish_indent
# fish scripts even conform to `fish_indent` output at this time. When `fish_indent` output is # currently does not honor that whitespace.
# deemed acceptable as a default and all the fish scripts have been restyled this comment should set f_files (printf '%s\n' share/***.fish | grep -v /completions/)
# be removed and the following statement uncommented.
# set f_files share/***.fish
else else
# We haven't been asked to reformat all the source. If there are uncommitted changes reformat # We haven't been asked to reformat all the source. If there are uncommitted changes reformat
# those using `git clang-format`. Else reformat the files in the most recent commit. # those using `git clang-format`. Else reformat the files in the most recent commit.

View file

@ -46,7 +46,8 @@ if status --is-interactive
or test "$COLORTERM" = truecolor -o "$COLORTERM" = 24bit # slang expects this or test "$COLORTERM" = truecolor -o "$COLORTERM" = 24bit # slang expects this
end end
# Only set it if it isn't to allow override by setting to 0 # Only set it if it isn't to allow override by setting to 0
set -q fish_term24bit; or set -g fish_term24bit 1 set -q fish_term24bit
or set -g fish_term24bit 1
end end
end end
else else
@ -134,8 +135,11 @@ function __fish_load_path_helper_paths
end end
set __fish_tmp_path $__fish_tmp_path[-1..1] set __fish_tmp_path $__fish_tmp_path[-1..1]
end end
test -r /etc/paths ; and __fish_load_path_helper_paths < /etc/paths test -r /etc/paths
for pathfile in /etc/paths.d/* ; __fish_load_path_helper_paths < $pathfile ; end and __fish_load_path_helper_paths </etc/paths
for pathfile in /etc/paths.d/*
__fish_load_path_helper_paths <$pathfile
end
set -xg PATH $__fish_tmp_path set -xg PATH $__fish_tmp_path
set -e __fish_tmp_path set -e __fish_tmp_path
functions -e __fish_load_path_helper_paths functions -e __fish_load_path_helper_paths
@ -205,11 +209,13 @@ __fish_set_locale
set -l sourcelist set -l sourcelist
for file in $configdir/fish/conf.d/*.fish $__fish_sysconfdir/conf.d/*.fish $__extra_confdir/*.fish for file in $configdir/fish/conf.d/*.fish $__fish_sysconfdir/conf.d/*.fish $__extra_confdir/*.fish
set -l basename (string replace -r '^.*/' '' -- $file) set -l basename (string replace -r '^.*/' '' -- $file)
contains -- $basename $sourcelist; and continue contains -- $basename $sourcelist
and continue
set sourcelist $sourcelist $basename set sourcelist $sourcelist $basename
# Also skip non-files or unreadable files # Also skip non-files or unreadable files
# This allows one to use e.g. symlinks to /dev/null to "mask" something (like in systemd) # This allows one to use e.g. symlinks to /dev/null to "mask" something (like in systemd)
[ -f $file -a -r $file ]; and source $file [ -f $file -a -r $file ]
and source $file
end end
# Upgrade pre-existing abbreviations from the old "key=value" to the new "key value" syntax # Upgrade pre-existing abbreviations from the old "key=value" to the new "key value" syntax