mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 12:23:09 +00:00
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:
parent
9443a415bf
commit
42eaacd3a1
3 changed files with 145 additions and 141 deletions
|
@ -30,12 +30,10 @@ if test $all = yes
|
|||
exit 1
|
||||
end
|
||||
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
|
||||
# problems with its output that require manual intervention. Not to mention that very few of the
|
||||
# fish scripts even conform to `fish_indent` output at this time. When `fish_indent` output is
|
||||
# deemed acceptable as a default and all the fish scripts have been restyled this comment should
|
||||
# be removed and the following statement uncommented.
|
||||
# set f_files share/***.fish
|
||||
# For now we don't restyle all fish scripts other than completion scripts. That's because people
|
||||
# really like to vertically align the elements of the `complete` command and fish_indent
|
||||
# currently does not honor that whitespace.
|
||||
set f_files (printf '%s\n' share/***.fish | grep -v /completions/)
|
||||
else
|
||||
# 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.
|
||||
|
|
|
@ -46,7 +46,8 @@ if status --is-interactive
|
|||
or test "$COLORTERM" = truecolor -o "$COLORTERM" = 24bit # slang expects this
|
||||
end
|
||||
# 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
|
||||
else
|
||||
|
@ -134,8 +135,11 @@ function __fish_load_path_helper_paths
|
|||
end
|
||||
set __fish_tmp_path $__fish_tmp_path[-1..1]
|
||||
end
|
||||
test -r /etc/paths ; and __fish_load_path_helper_paths < /etc/paths
|
||||
for pathfile in /etc/paths.d/* ; __fish_load_path_helper_paths < $pathfile ; end
|
||||
test -r /etc/paths
|
||||
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 -e __fish_tmp_path
|
||||
functions -e __fish_load_path_helper_paths
|
||||
|
@ -205,11 +209,13 @@ __fish_set_locale
|
|||
set -l sourcelist
|
||||
for file in $configdir/fish/conf.d/*.fish $__fish_sysconfdir/conf.d/*.fish $__extra_confdir/*.fish
|
||||
set -l basename (string replace -r '^.*/' '' -- $file)
|
||||
contains -- $basename $sourcelist; and continue
|
||||
contains -- $basename $sourcelist
|
||||
and continue
|
||||
set sourcelist $sourcelist $basename
|
||||
# Also skip non-files or unreadable files
|
||||
# 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
|
||||
|
||||
# Upgrade pre-existing abbreviations from the old "key=value" to the new "key value" syntax
|
||||
|
|
Loading…
Reference in a new issue