format: use 4-space indents in more files

Change some files which have lines whose indentation is not a multiple
of the 4 spaces specified in the editorconfig file.

Some of these changes are fixes or clear improvements (e.g. in Rust
macros which rustfmt can't format properly). Other changes don't clearly
improve the code style, and in some cases it might actually get worse.

The goal is to eventually be able to use our editorconfig for automated
style checks, but there are a lot of cases where conforming to the
limited editorconfig style spec does not make sense, so I'm not sure how
useful such automated checks can be.

Closes #12408
This commit is contained in:
Daniel Rainer
2026-02-02 18:08:40 +01:00
committed by Johannes Altmanninger
parent 1df7a8ba29
commit c5e4fed021
42 changed files with 540 additions and 481 deletions

View File

@@ -21,7 +21,7 @@ indent_size = 4
[build_tools/release.sh]
max_line_length = 72
[{Dockerfile,Vagrantfile}]
[Vagrantfile]
indent_size = 2
[share/{completions,functions}/**.fish]

View File

@@ -53,36 +53,36 @@ add_definitions(-DCMAKE_SOURCE_DIR="${REAL_CMAKE_SOURCE_DIR}")
set(build_types Release RelWithDebInfo Debug "")
if(NOT "${CMAKE_BUILD_TYPE}" IN_LIST build_types)
message(WARNING "Unsupported build type ${CMAKE_BUILD_TYPE}. If this doesn't build, try one of Release, RelWithDebInfo or Debug")
message(WARNING "Unsupported build type ${CMAKE_BUILD_TYPE}. If this doesn't build, try one of Release, RelWithDebInfo or Debug")
endif()
add_custom_target(
fish ALL
COMMAND
"${CMAKE_COMMAND}" -E
env ${VARS_FOR_CARGO}
${Rust_CARGO}
build --bin fish
$<$<CONFIG:Release>:--release>
$<$<CONFIG:RelWithDebInfo>:--profile=release-with-debug>
--target ${Rust_CARGO_TARGET}
--no-default-features
--features=${FISH_CARGO_FEATURES}
${CARGO_FLAGS}
&&
"${CMAKE_COMMAND}" -E
copy "${rust_target_dir}/${rust_profile}/fish" "${CMAKE_CURRENT_BINARY_DIR}"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
USES_TERMINAL
fish ALL
COMMAND
"${CMAKE_COMMAND}" -E
env ${VARS_FOR_CARGO}
${Rust_CARGO}
build --bin fish
$<$<CONFIG:Release>:--release>
$<$<CONFIG:RelWithDebInfo>:--profile=release-with-debug>
--target ${Rust_CARGO_TARGET}
--no-default-features
--features=${FISH_CARGO_FEATURES}
${CARGO_FLAGS}
&&
"${CMAKE_COMMAND}" -E
copy "${rust_target_dir}/${rust_profile}/fish" "${CMAKE_CURRENT_BINARY_DIR}"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
USES_TERMINAL
)
function(CREATE_LINK target)
add_custom_target(
${target} ALL
DEPENDS fish
COMMAND ln -f fish ${target}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
)
add_custom_target(
${target} ALL
DEPENDS fish
COMMAND ln -f fish ${target}
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
)
endfunction(CREATE_LINK)
# Define fish_indent.

View File

@@ -15,8 +15,7 @@ tmpdir=$(mktemp -d)
manifest=$tmpdir/Cargo.toml
lockfile=$tmpdir/Cargo.lock
sed "s/^version = \".*\"\$/version = \"$VERSION\"/g" Cargo.toml \
>"$manifest"
sed "s/^version = \".*\"\$/version = \"$VERSION\"/g" Cargo.toml >"$manifest"
awk -v version=$VERSION '
/^name = "fish"$/ { ok=1 }
ok == 1 && /^version = ".*"$/ {

View File

@@ -10,8 +10,8 @@ fi
scriptname=$(basename "$0")
if [ "$(id -u)" -ne 0 ]; then
echo "${scriptname} must be run as root"
exit 1
echo "${scriptname} must be run as root"
exit 1
fi
file=/etc/shells

View File

@@ -2,6 +2,6 @@
echo "Removing any previous installation"
pkgutil --pkg-info "${INSTALL_PKG_SESSION_ID}" && pkgutil --only-files --files "${INSTALL_PKG_SESSION_ID}" | while read -r installed
do rm -v "${DSTVOLUME}${installed}"
do rm -v "${DSTVOLUME}${installed}"
done
echo "... removed"

View File

@@ -51,9 +51,10 @@ endif()
add_feature_info(Documentation WITH_DOCS "user manual and documentation")
if(WITH_DOCS)
add_custom_target(doc ALL
DEPENDS sphinx-docs sphinx-manpages)
add_custom_target(doc ALL DEPENDS sphinx-docs sphinx-manpages)
# Group docs targets into a DocsTargets folder
set_property(TARGET doc sphinx-docs sphinx-manpages
PROPERTY FOLDER cmake/DocTargets)
set_property(
TARGET doc sphinx-docs sphinx-manpages
PROPERTY FOLDER cmake/DocTargets
)
endif()

View File

@@ -22,17 +22,17 @@ foreach(_VAR ${_Rust_USER_VARS})
endforeach()
if (NOT DEFINED Rust_CARGO_CACHED)
find_program(Rust_CARGO_CACHED cargo PATHS "$ENV{HOME}/.cargo/bin")
find_program(Rust_CARGO_CACHED cargo PATHS "$ENV{HOME}/.cargo/bin")
endif()
if (NOT EXISTS "${Rust_CARGO_CACHED}")
message(FATAL_ERROR "The cargo executable ${Rust_CARGO_CACHED} was not found. "
"Consider setting `Rust_CARGO_CACHED` to the absolute path of `cargo`."
)
message(FATAL_ERROR "The cargo executable ${Rust_CARGO_CACHED} was not found. "
"Consider setting `Rust_CARGO_CACHED` to the absolute path of `cargo`."
)
endif()
if (NOT DEFINED Rust_COMPILER_CACHED)
find_program(Rust_COMPILER_CACHED rustc PATHS "$ENV{HOME}/.cargo/bin")
find_program(Rust_COMPILER_CACHED rustc PATHS "$ENV{HOME}/.cargo/bin")
endif()
@@ -45,31 +45,31 @@ endif()
# Figure out the target by just using the host target.
# If you want to cross-compile, you'll have to set Rust_CARGO_TARGET
if(NOT Rust_CARGO_TARGET_CACHED)
execute_process(
COMMAND "${Rust_COMPILER_CACHED}" --version --verbose
OUTPUT_VARIABLE _RUSTC_VERSION_RAW
RESULT_VARIABLE _RUSTC_VERSION_RESULT
)
if(NOT ( "${_RUSTC_VERSION_RESULT}" EQUAL "0" ))
message(FATAL_ERROR "Failed to get rustc version.\n"
"${Rust_COMPILER} --version failed with error: `${_RUSTC_VERSION_RESULT}`")
endif()
if (_RUSTC_VERSION_RAW MATCHES "host: ([a-zA-Z0-9_\\-]*)\n")
set(Rust_DEFAULT_HOST_TARGET "${CMAKE_MATCH_1}")
else()
message(FATAL_ERROR
"Failed to parse rustc host target. `rustc --version --verbose` evaluated to:\n${_RUSTC_VERSION_RAW}"
execute_process(
COMMAND "${Rust_COMPILER_CACHED}" --version --verbose
OUTPUT_VARIABLE _RUSTC_VERSION_RAW
RESULT_VARIABLE _RUSTC_VERSION_RESULT
)
endif()
if(CMAKE_CROSSCOMPILING)
message(FATAL_ERROR "CMake is in cross-compiling mode."
"Manually set `Rust_CARGO_TARGET`."
)
endif()
set(Rust_CARGO_TARGET_CACHED "${Rust_DEFAULT_HOST_TARGET}" CACHE STRING "Target triple")
if(NOT ( "${_RUSTC_VERSION_RESULT}" EQUAL "0" ))
message(FATAL_ERROR "Failed to get rustc version.\n"
"${Rust_COMPILER} --version failed with error: `${_RUSTC_VERSION_RESULT}`")
endif()
if (_RUSTC_VERSION_RAW MATCHES "host: ([a-zA-Z0-9_\\-]*)\n")
set(Rust_DEFAULT_HOST_TARGET "${CMAKE_MATCH_1}")
else()
message(FATAL_ERROR
"Failed to parse rustc host target. `rustc --version --verbose` evaluated to:\n${_RUSTC_VERSION_RAW}"
)
endif()
if(CMAKE_CROSSCOMPILING)
message(FATAL_ERROR "CMake is in cross-compiling mode."
"Manually set `Rust_CARGO_TARGET`."
)
endif()
set(Rust_CARGO_TARGET_CACHED "${Rust_DEFAULT_HOST_TARGET}" CACHE STRING "Target triple")
endif()
# Set the input variables as non-cache variables so that the variables are available after

View File

@@ -14,32 +14,36 @@ set(rel_completionsdir "fish/vendor_completions.d")
set(rel_functionsdir "fish/vendor_functions.d")
set(rel_confdir "fish/vendor_conf.d")
set(extra_completionsdir
"${datadir}/${rel_completionsdir}"
CACHE STRING "Path for extra completions")
set(
extra_completionsdir "${datadir}/${rel_completionsdir}"
CACHE STRING "Path for extra completions"
)
set(extra_functionsdir
"${datadir}/${rel_functionsdir}"
CACHE STRING "Path for extra functions")
set(
extra_functionsdir "${datadir}/${rel_functionsdir}"
CACHE STRING "Path for extra functions"
)
set(extra_confdir
"${datadir}/${rel_confdir}"
CACHE STRING "Path for extra configuration")
set(
extra_confdir "${datadir}/${rel_confdir}"
CACHE STRING "Path for extra configuration"
)
# These are the man pages that go in system manpath; all manpages go in the fish-specific manpath.
set(MANUALS ${SPHINX_OUTPUT_DIR}/man/man1/fish.1
${SPHINX_OUTPUT_DIR}/man/man1/fish_indent.1
${SPHINX_OUTPUT_DIR}/man/man1/fish_key_reader.1
${SPHINX_OUTPUT_DIR}/man/man1/fish-doc.1
${SPHINX_OUTPUT_DIR}/man/man1/fish-tutorial.1
${SPHINX_OUTPUT_DIR}/man/man1/fish-language.1
${SPHINX_OUTPUT_DIR}/man/man1/fish-interactive.1
${SPHINX_OUTPUT_DIR}/man/man1/fish-terminal-compatibility.1
${SPHINX_OUTPUT_DIR}/man/man1/fish-completions.1
${SPHINX_OUTPUT_DIR}/man/man1/fish-prompt-tutorial.1
${SPHINX_OUTPUT_DIR}/man/man1/fish-for-bash-users.1
${SPHINX_OUTPUT_DIR}/man/man1/fish-faq.1
set(MANUALS
${SPHINX_OUTPUT_DIR}/man/man1/fish.1
${SPHINX_OUTPUT_DIR}/man/man1/fish_indent.1
${SPHINX_OUTPUT_DIR}/man/man1/fish_key_reader.1
${SPHINX_OUTPUT_DIR}/man/man1/fish-doc.1
${SPHINX_OUTPUT_DIR}/man/man1/fish-tutorial.1
${SPHINX_OUTPUT_DIR}/man/man1/fish-language.1
${SPHINX_OUTPUT_DIR}/man/man1/fish-interactive.1
${SPHINX_OUTPUT_DIR}/man/man1/fish-terminal-compatibility.1
${SPHINX_OUTPUT_DIR}/man/man1/fish-completions.1
${SPHINX_OUTPUT_DIR}/man/man1/fish-prompt-tutorial.1
${SPHINX_OUTPUT_DIR}/man/man1/fish-for-bash-users.1
${SPHINX_OUTPUT_DIR}/man/man1/fish-faq.1
)
# Determine which man page we don't want to install.
@@ -48,40 +52,49 @@ set(MANUALS ${SPHINX_OUTPUT_DIR}/man/man1/fish.1
# On other operating systems, don't install a realpath man page, as they almost all have a realpath
# command, while macOS does not.
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CONDEMNED_PAGE "open.1")
set(CONDEMNED_PAGE "open.1")
else()
set(CONDEMNED_PAGE "realpath.1")
set(CONDEMNED_PAGE "realpath.1")
endif()
# Define a function to help us create directories.
function(FISH_CREATE_DIRS)
foreach(dir ${ARGV})
install(DIRECTORY DESTINATION ${dir})
endforeach(dir)
foreach(dir ${ARGV})
install(DIRECTORY DESTINATION ${dir})
endforeach(dir)
endfunction(FISH_CREATE_DIRS)
function(FISH_TRY_CREATE_DIRS)
foreach(dir ${ARGV})
if(NOT IS_ABSOLUTE ${dir})
set(abs_dir "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${dir}")
else()
set(abs_dir "\$ENV{DESTDIR}${dir}")
endif()
install(SCRIPT CODE "EXECUTE_PROCESS(COMMAND mkdir -p ${abs_dir} OUTPUT_QUIET ERROR_QUIET)
execute_process(COMMAND chmod 755 ${abs_dir} OUTPUT_QUIET ERROR_QUIET)
")
endforeach()
foreach(dir ${ARGV})
if(NOT IS_ABSOLUTE ${dir})
set(abs_dir "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${dir}")
else()
set(abs_dir "\$ENV{DESTDIR}${dir}")
endif()
install(SCRIPT CODE "
EXECUTE_PROCESS(COMMAND mkdir -p ${abs_dir} OUTPUT_QUIET ERROR_QUIET)
execute_process(COMMAND chmod 755 ${abs_dir} OUTPUT_QUIET ERROR_QUIET)
")
endforeach()
endfunction(FISH_TRY_CREATE_DIRS)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fish
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ
GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
DESTINATION ${bindir})
install(
PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/fish
PERMISSIONS
OWNER_READ
OWNER_WRITE
OWNER_EXECUTE
GROUP_READ
GROUP_EXECUTE
WORLD_READ
WORLD_EXECUTE
DESTINATION ${bindir}
)
if(NOT IS_ABSOLUTE ${bindir})
set(abs_bindir "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${bindir}")
set(abs_bindir "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${bindir}")
else()
set(abs_bindir "\$ENV{DESTDIR}${bindir}")
set(abs_bindir "\$ENV{DESTDIR}${bindir}")
endif()
install(CODE "file(CREATE_LINK ${abs_bindir}/fish ${abs_bindir}/fish_indent)")
install(CODE "file(CREATE_LINK ${abs_bindir}/fish ${abs_bindir}/fish_key_reader)")
@@ -90,87 +103,116 @@ fish_create_dirs(${sysconfdir}/fish/conf.d ${sysconfdir}/fish/completions
${sysconfdir}/fish/functions)
install(FILES etc/config.fish DESTINATION ${sysconfdir}/fish/)
fish_create_dirs(${rel_datadir}/fish ${rel_datadir}/fish/completions
${rel_datadir}/fish/functions
${rel_datadir}/fish/man/man1 ${rel_datadir}/fish/tools
${rel_datadir}/fish/tools/web_config
${rel_datadir}/fish/tools/web_config/js
${rel_datadir}/fish/prompts
${rel_datadir}/fish/themes
)
fish_create_dirs(
${rel_datadir}/fish ${rel_datadir}/fish/completions
${rel_datadir}/fish/functions
${rel_datadir}/fish/man/man1 ${rel_datadir}/fish/tools
${rel_datadir}/fish/tools/web_config
${rel_datadir}/fish/tools/web_config/js
${rel_datadir}/fish/prompts
${rel_datadir}/fish/themes
)
configure_file(share/__fish_build_paths.fish.in share/__fish_build_paths.fish)
install(FILES share/config.fish
${CMAKE_CURRENT_BINARY_DIR}/share/__fish_build_paths.fish
DESTINATION ${rel_datadir}/fish)
${CMAKE_CURRENT_BINARY_DIR}/share/__fish_build_paths.fish
DESTINATION ${rel_datadir}/fish
)
# Create only the vendor directories inside the prefix (#5029 / #6508)
fish_create_dirs(${rel_datadir}/fish/vendor_completions.d ${rel_datadir}/fish/vendor_functions.d
${rel_datadir}/fish/vendor_conf.d)
fish_create_dirs(
${rel_datadir}/fish/vendor_completions.d
${rel_datadir}/fish/vendor_functions.d
${rel_datadir}/fish/vendor_conf.d
)
fish_try_create_dirs(${rel_datadir}/pkgconfig)
configure_file(fish.pc.in fish.pc.noversion @ONLY)
add_custom_command(OUTPUT fish.pc
add_custom_command(
OUTPUT fish.pc
COMMAND sed '/Version/d' fish.pc.noversion > fish.pc
COMMAND printf "Version: " >> fish.pc
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/build_tools/git_version_gen.sh >> fish.pc
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/fish.pc.noversion)
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/fish.pc.noversion
)
add_custom_target(build_fish_pc ALL DEPENDS fish.pc)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/fish.pc
DESTINATION ${rel_datadir}/pkgconfig)
install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/fish.pc
DESTINATION ${rel_datadir}/pkgconfig
)
install(DIRECTORY share/completions/
DESTINATION ${rel_datadir}/fish/completions
FILES_MATCHING PATTERN "*.fish")
install(
DIRECTORY share/completions/
DESTINATION ${rel_datadir}/fish/completions
FILES_MATCHING PATTERN "*.fish"
)
install(DIRECTORY share/functions/
DESTINATION ${rel_datadir}/fish/functions
FILES_MATCHING PATTERN "*.fish")
install(
DIRECTORY share/functions/
DESTINATION ${rel_datadir}/fish/functions
FILES_MATCHING PATTERN "*.fish"
)
install(DIRECTORY share/prompts/
DESTINATION ${rel_datadir}/fish/prompts
FILES_MATCHING PATTERN "*.fish")
install(
DIRECTORY share/prompts/
DESTINATION ${rel_datadir}/fish/prompts
FILES_MATCHING PATTERN "*.fish"
)
install(DIRECTORY share/themes/
DESTINATION ${rel_datadir}/fish/themes
FILES_MATCHING PATTERN "*.theme")
install(
DIRECTORY share/themes/
DESTINATION ${rel_datadir}/fish/themes
FILES_MATCHING PATTERN "*.theme"
)
# CONDEMNED_PAGE is managed by the conditional above
# Building the man pages is optional: if sphinx isn't installed, they're not built
install(DIRECTORY ${SPHINX_OUTPUT_DIR}/man/man1/
DESTINATION ${rel_datadir}/fish/man/man1
FILES_MATCHING
PATTERN "*.1"
PATTERN ${CONDEMNED_PAGE} EXCLUDE)
install(
DIRECTORY ${SPHINX_OUTPUT_DIR}/man/man1/
DESTINATION ${rel_datadir}/fish/man/man1
FILES_MATCHING
PATTERN "*.1"
PATTERN ${CONDEMNED_PAGE} EXCLUDE
)
install(PROGRAMS share/tools/create_manpage_completions.py
DESTINATION ${rel_datadir}/fish/tools/)
install(
PROGRAMS share/tools/create_manpage_completions.py
DESTINATION ${rel_datadir}/fish/tools/
)
install(DIRECTORY share/tools/web_config
DESTINATION ${rel_datadir}/fish/tools/
FILES_MATCHING
PATTERN "*.png"
PATTERN "*.css"
PATTERN "*.html"
PATTERN "*.py"
PATTERN "*.js")
install(
DIRECTORY share/tools/web_config
DESTINATION ${rel_datadir}/fish/tools/
FILES_MATCHING
PATTERN "*.png"
PATTERN "*.css"
PATTERN "*.html"
PATTERN "*.py"
PATTERN "*.js"
)
# Building the man pages is optional: if Sphinx isn't installed, they're not built
install(FILES ${MANUALS} DESTINATION ${mandir}/man1/ OPTIONAL)
install(DIRECTORY ${SPHINX_OUTPUT_DIR}/html/ # Trailing slash is important!
DESTINATION ${docdir} OPTIONAL)
install(
DIRECTORY ${SPHINX_OUTPUT_DIR}/html/ # Trailing slash is important!
DESTINATION ${docdir} OPTIONAL
)
install(FILES CHANGELOG.rst DESTINATION ${docdir})
# Group install targets into a InstallTargets folder
set_property(TARGET build_fish_pc
PROPERTY FOLDER cmake/InstallTargets)
set_property(
TARGET build_fish_pc
PROPERTY FOLDER cmake/InstallTargets
)
# Make a target build_root that installs into the buildroot directory, for testing.
set(BUILDROOT_DIR ${CMAKE_CURRENT_BINARY_DIR}/buildroot)
add_custom_target(build_root
COMMAND DESTDIR=${BUILDROOT_DIR} ${CMAKE_COMMAND}
--build ${CMAKE_CURRENT_BINARY_DIR} --target install)
add_custom_target(
build_root
COMMAND DESTDIR=${BUILDROOT_DIR} ${CMAKE_COMMAND}
--build ${CMAKE_CURRENT_BINARY_DIR} --target install
)

View File

@@ -1,9 +1,10 @@
set(FISH_USE_SYSTEM_PCRE2 ON CACHE BOOL
"Try to use PCRE2 from the system, instead of the pcre2-sys version")
"Try to use PCRE2 from the system, instead of the pcre2-sys version"
)
if(FISH_USE_SYSTEM_PCRE2)
message(STATUS "Trying to use PCRE2 from the system")
message(STATUS "Trying to use PCRE2 from the system")
else()
message(STATUS "Forcing static build of PCRE2")
set(FISH_PCRE2_BUILDFLAG "PCRE2_SYS_STATIC=1")
message(STATUS "Forcing static build of PCRE2")
set(FISH_PCRE2_BUILDFLAG "PCRE2_SYS_STATIC=1")
endif(FISH_USE_SYSTEM_PCRE2)

View File

@@ -1,27 +1,27 @@
FILE(GLOB FISH_CHECKS CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR}/tests/checks/*.fish)
foreach(CHECK ${FISH_CHECKS})
get_filename_component(CHECK_NAME ${CHECK} NAME)
add_custom_target(
test_${CHECK_NAME}
COMMAND ${CMAKE_SOURCE_DIR}/tests/test_driver.py ${CMAKE_CURRENT_BINARY_DIR}
checks/${CHECK_NAME}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests
DEPENDS fish fish_indent fish_key_reader
USES_TERMINAL
)
get_filename_component(CHECK_NAME ${CHECK} NAME)
add_custom_target(
test_${CHECK_NAME}
COMMAND ${CMAKE_SOURCE_DIR}/tests/test_driver.py ${CMAKE_CURRENT_BINARY_DIR}
checks/${CHECK_NAME}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests
DEPENDS fish fish_indent fish_key_reader
USES_TERMINAL
)
endforeach(CHECK)
FILE(GLOB PEXPECTS CONFIGURE_DEPENDS ${CMAKE_SOURCE_DIR}/tests/pexpects/*.py)
foreach(PEXPECT ${PEXPECTS})
get_filename_component(PEXPECT ${PEXPECT} NAME)
add_custom_target(
test_${PEXPECT}
COMMAND ${CMAKE_SOURCE_DIR}/tests/test_driver.py ${CMAKE_CURRENT_BINARY_DIR}
pexpects/${PEXPECT}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests
DEPENDS fish fish_indent fish_key_reader
USES_TERMINAL
)
get_filename_component(PEXPECT ${PEXPECT} NAME)
add_custom_target(
test_${PEXPECT}
COMMAND ${CMAKE_SOURCE_DIR}/tests/test_driver.py ${CMAKE_CURRENT_BINARY_DIR}
pexpects/${PEXPECT}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/tests
DEPENDS fish fish_indent fish_key_reader
USES_TERMINAL
)
endforeach(PEXPECT)
# Rust stuff.
@@ -30,14 +30,20 @@ if(DEFINED ASAN)
# Rust w/ -Zsanitizer=address requires explicitly specifying the --target triple or else linker
# errors pertaining to asan symbols will ensue.
if(NOT DEFINED Rust_CARGO_TARGET)
message(FATAL_ERROR "ASAN requires defining the CMake variable Rust_CARGO_TARGET to the
intended target triple")
message(
FATAL_ERROR
"ASAN requires defining the CMake variable Rust_CARGO_TARGET to the
intended target triple"
)
endif()
endif()
if(DEFINED TSAN)
if(NOT DEFINED Rust_CARGO_TARGET)
message(FATAL_ERROR "TSAN requires defining the CMake variable Rust_CARGO_TARGET to the
intended target triple")
message(
FATAL_ERROR
"TSAN requires defining the CMake variable Rust_CARGO_TARGET to the
intended target triple"
)
endif()
endif()
@@ -53,10 +59,10 @@ endif()
# The top-level test target is "fish_run_tests".
add_custom_target(fish_run_tests
# TODO: This should be replaced with a unified solution, possibly build_tools/check.sh.
COMMAND ${CMAKE_SOURCE_DIR}/tests/test_driver.py ${max_concurrency_flag} ${CMAKE_CURRENT_BINARY_DIR}
COMMAND env ${VARS_FOR_CARGO}
${Rust_CARGO}
# TODO: This should be replaced with a unified solution, possibly build_tools/check.sh.
COMMAND ${CMAKE_SOURCE_DIR}/tests/test_driver.py ${max_concurrency_flag} ${CMAKE_CURRENT_BINARY_DIR}
COMMAND
env ${VARS_FOR_CARGO} ${Rust_CARGO}
test
--no-default-features
--features=${FISH_CARGO_FEATURES}
@@ -64,7 +70,7 @@ add_custom_target(fish_run_tests
--workspace
--target-dir ${rust_target_dir}
${cargo_test_flags}
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
DEPENDS fish fish_indent fish_key_reader
USES_TERMINAL
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
DEPENDS fish fish_indent fish_key_reader
USES_TERMINAL
)

View File

@@ -37,8 +37,8 @@ RUN adduser \
fishuser
RUN mkdir -p /home/fishuser/fish-build \
&& mkdir /fish-source \
&& chown -R fishuser:fishuser /home/fishuser /fish-source
&& mkdir /fish-source \
&& chown -R fishuser:fishuser /home/fishuser /fish-source
USER fishuser
WORKDIR /home/fishuser

View File

@@ -2,24 +2,24 @@ FROM fedora:latest
LABEL org.opencontainers.image.source=https://github.com/fish-shell/fish-shell
RUN dnf install --assumeyes \
diffutils \
gcc-c++ \
git-core \
pcre2-devel \
python3 \
python3-pip \
openssl \
procps \
sudo && \
diffutils \
gcc-c++ \
git-core \
pcre2-devel \
python3 \
python3-pip \
openssl \
procps \
sudo && \
dnf clean all
RUN pip3 install pexpect
RUN groupadd -g 1000 fishuser \
&& useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser -G wheel \
&& mkdir -p /home/fishuser/fish-build \
&& mkdir /fish-source \
&& chown -R fishuser:fishuser /home/fishuser /fish-source
&& useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser -G wheel \
&& mkdir -p /home/fishuser/fish-build \
&& mkdir /fish-source \
&& chown -R fishuser:fishuser /home/fishuser /fish-source
USER fishuser
WORKDIR /home/fishuser

View File

@@ -5,28 +5,28 @@ ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
RUN zypper --non-interactive install \
bash \
diffutils \
gcc-c++ \
git-core \
pcre2-devel \
python311 \
python311-pip \
python311-pexpect \
openssl \
procps \
tmux \
sudo \
rust \
cargo
bash \
diffutils \
gcc-c++ \
git-core \
pcre2-devel \
python311 \
python311-pip \
python311-pexpect \
openssl \
procps \
tmux \
sudo \
rust \
cargo
RUN usermod -p $(openssl passwd -1 fish) root
RUN groupadd -g 1000 fishuser \
&& useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser \
&& mkdir -p /home/fishuser/fish-build \
&& mkdir /fish-source \
&& chown -R fishuser:fishuser /home/fishuser /fish-source
&& useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser \
&& mkdir -p /home/fishuser/fish-build \
&& mkdir /fish-source \
&& chown -R fishuser:fishuser /home/fishuser /fish-source
USER fishuser
WORKDIR /home/fishuser

View File

@@ -6,37 +6,37 @@ ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
RUN apt-get update \
&& apt-get -y install --no-install-recommends \
cmake ninja-build \
build-essential \
ca-certificates \
clang \
curl \
gettext \
git \
libpcre2-dev \
locales \
openssl \
python3 \
python3-pexpect \
sudo \
tmux \
&& locale-gen en_US.UTF-8 \
&& apt-get clean
&& apt-get -y install --no-install-recommends \
cmake ninja-build \
build-essential \
ca-certificates \
clang \
curl \
gettext \
git \
libpcre2-dev \
locales \
openssl \
python3 \
python3-pexpect \
sudo \
tmux \
&& locale-gen en_US.UTF-8 \
&& apt-get clean
RUN userdel ubuntu \
&& groupadd -g 1000 fishuser \
&& useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser \
-G sudo \
&& mkdir -p /home/fishuser/fish-build \
&& mkdir /fish-source \
&& chown -R fishuser:1000 /home/fishuser /fish-source
&& groupadd -g 1000 fishuser \
&& useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser \
-G sudo \
&& mkdir -p /home/fishuser/fish-build \
&& mkdir /fish-source \
&& chown -R fishuser:1000 /home/fishuser /fish-source
USER fishuser
WORKDIR /home/fishuser
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /tmp/rustup.sh \
&& sh /tmp/rustup.sh -y --no-modify-path
&& sh /tmp/rustup.sh -y --no-modify-path
ENV PATH=/home/fishuser/.cargo/bin:$PATH
COPY fish_run_tests.sh /

View File

@@ -6,36 +6,36 @@ ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
RUN apt-get update \
&& apt-get -y install --no-install-recommends \
cmake ninja-build \
build-essential \
ca-certificates \
clang \
curl \
gettext \
git \
libpcre2-dev \
locales \
openssl \
python3 \
python3-pexpect \
sudo \
tmux \
&& locale-gen en_US.UTF-8 \
&& apt-get clean
&& apt-get -y install --no-install-recommends \
cmake ninja-build \
build-essential \
ca-certificates \
clang \
curl \
gettext \
git \
libpcre2-dev \
locales \
openssl \
python3 \
python3-pexpect \
sudo \
tmux \
&& locale-gen en_US.UTF-8 \
&& apt-get clean
RUN groupadd -g 1000 fishuser \
&& useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser \
&& adduser fishuser sudo \
&& mkdir -p /home/fishuser/fish-build \
&& mkdir /fish-source \
&& chown -R fishuser:fishuser /home/fishuser /fish-source
&& useradd -p $(openssl passwd -1 fish) -d /home/fishuser -m -u 1000 -g 1000 fishuser \
&& adduser fishuser sudo \
&& mkdir -p /home/fishuser/fish-build \
&& mkdir /fish-source \
&& chown -R fishuser:fishuser /home/fishuser /fish-source
USER fishuser
WORKDIR /home/fishuser
RUN curl --proto '=https' --tlsv1.2 -fsS https://sh.rustup.rs > /tmp/rustup.sh \
&& sh /tmp/rustup.sh -y --no-modify-path
&& sh /tmp/rustup.sh -y --no-modify-path
ENV PATH=/home/fishuser/.cargo/bin:$PATH
COPY fish_run_tests.sh /

View File

@@ -2,7 +2,7 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.get-task-allow</key>
<true/>
<key>com.apple.security.get-task-allow</key>
<true/>
</dict>
</plist>

View File

@@ -4,25 +4,31 @@ complete -c ansible-galaxy -s h -l help -d "Show help message"
complete -c ansible-galaxy -n __fish_use_subcommand -s v -l verbose -d "Verbose mode (-vvv for more, -vvvv for connection debugging)"
# first subcommand
complete -c ansible-galaxy -n __fish_use_subcommand -xa "collection\t'Manage a collection'
role\t'Manage a role'"
complete -c ansible-galaxy -n __fish_use_subcommand -xa "
collection\t'Manage a collection'
role\t'Manage a role'
"
# second subcommand (for collection)
complete -c ansible-galaxy -n '__fish_seen_subcommand_from collection' -a "download\t'Download collections as tarball'
init\t'Initialize new collection with the base structure'
build\t'Build collection artifact that can be published'
publish\t'Publish collection artifact to Ansible Galaxy'
install\t'Install collections'
list\t'Show collections installed'
verify\t'Compare checksums of local and remote collections'"
complete -c ansible-galaxy -n '__fish_seen_subcommand_from collection' -a "
download\t'Download collections as tarball'
init\t'Initialize new collection with the base structure'
build\t'Build collection artifact that can be published'
publish\t'Publish collection artifact to Ansible Galaxy'
install\t'Install collections'
list\t'Show collections installed'
verify\t'Compare checksums of local and remote collections'
"
# second subcommand (for role)
complete -c ansible-galaxy -n '__fish_seen_subcommand_from role' -a "init\t'Initialize new role with the base structure'
remove\t'Delete roles from roles_path'
delete\t'Removes the role from Galaxy'
list\t'Show roles installed'
search\t'Search the Galaxy database by keywords'
import\t'Import role into a galaxy server'
setup\t'Manage integration between Galaxy and the given source'
info\t'View details about a role'
install\t'Install roles'"
complete -c ansible-galaxy -n '__fish_seen_subcommand_from role' -a "
init\t'Initialize new role with the base structure'
remove\t'Delete roles from roles_path'
delete\t'Removes the role from Galaxy'
list\t'Show roles installed'
search\t'Search the Galaxy database by keywords'
import\t'Import role into a galaxy server'
setup\t'Manage integration between Galaxy and the given source'
info\t'View details about a role'
install\t'Install roles'
"

View File

@@ -31,7 +31,7 @@ data = json.load(json_data)
json_data.close()
packages = itertools.chain(data.get('require', {}).keys(), data.get('require-dev', {}).keys())
print(\"\n\".join(packages))
" | $python -S
" | $python -S
end
function __fish_composer_installed_packages

View File

@@ -1,3 +1 @@
complete -c dvipdf -k -x -a "(
__fish_complete_suffix .dvi
)"
complete -c dvipdf -k -x -a "(__fish_complete_suffix .dvi)"

View File

@@ -1,4 +1 @@
complete -c dvipdfm -k -x -a "
(
__fish_complete_suffix .dvi
)"
complete -c dvipdfm -k -x -a "(__fish_complete_suffix .dvi)"

View File

@@ -1469,11 +1469,13 @@ complete -f -c git -n '__fish_git_using_command commit' -l fixup -d 'Fixup commi
complete -f -c git -n '__fish_git_using_command commit' -l squash -d 'Squash commit to be used with rebase --autosquash'
complete -c git -n '__fish_git_using_command commit' -l reset-author -d 'When amending, reset author of commit to the committer'
complete -x -c git -n '__fish_git_using_command commit' -l author -d 'Override the commit author'
complete -x -c git -n '__fish_git_using_command commit' -l cleanup -a "strip\t'Leading/trailing whitespace/empty lines, #commentary'
whitespace\t'Like strip but keep #commentary'
verbatim\t'Do not change the message'
scissors\t'Like whitespace but also remove after scissor lines'
default\t'Like strip if the message is to be edited, whitespace otherwise'" -d 'How to clean up the commit message'
complete -x -c git -n '__fish_git_using_command commit' -l cleanup -a "
strip\t'Leading/trailing whitespace/empty lines, #commentary'
whitespace\t'Like strip but keep #commentary'
verbatim\t'Do not change the message'
scissors\t'Like whitespace but also remove after scissor lines'
default\t'Like strip if the message is to be edited, whitespace otherwise'
" -d 'How to clean up the commit message'
complete -x -c git -n '__fish_git_using_command commit' -l date -d 'Override the author date'
complete -x -c git -n '__fish_git_using_command commit' -s m -l message -d 'Use the given message as the commit message'
complete -f -c git -n '__fish_git_using_command commit' -l no-edit -d 'Use the selected commit message without launching an editor'
@@ -1793,26 +1795,26 @@ complete -c git -n '__fish_git_using_command log' -l no-standard-notes
complete -c git -n '__fish_git_using_command log' -l show-signature
complete -c git -n '__fish_git_using_command log' -l relative-date
complete -x -c git -n '__fish_git_using_command log shortlog' -l date -a '
relative
local
iso
iso-local
iso8601
iso8601-local
iso-strict
iso-strict-local
iso8601-strict
iso8601-strict-local
rfc-local
rfc2822-local
short
short-local
raw
human
unix
format:
default
default-local
relative
local
iso
iso-local
iso8601
iso8601-local
iso-strict
iso-strict-local
iso8601-strict
iso8601-strict-local
rfc-local
rfc2822-local
short
short-local
raw
human
unix
format:
default
default-local
'
complete -c git -n '__fish_git_using_command log' -l parents
complete -c git -n '__fish_git_using_command log' -l children
@@ -1848,10 +1850,10 @@ complete -c git -n '__fish_git_using_command log' -l name-status
complete -f -c git -n '__fish_git_using_command log' -l color -a 'always never auto'
complete -c git -n '__fish_git_using_command log' -l no-color
complete -f -c git -n '__fish_git_using_command log' -l word-diff -a '
color
plain
porcelain
none
color
plain
porcelain
none
'
complete -f -c git -n '__fish_git_using_command log' -l color-words
complete -c git -n '__fish_git_using_command log' -l no-renames

View File

@@ -6,11 +6,11 @@ complete -c i3-msg -l version -s v -d 'Display version number and exit'
complete -c i3-msg -l help -s h -d 'Display help and exit'
complete -c i3-msg -l socket -s s -d 'Set socket'
complete -c i3-msg -s t -x -d 'Specify ipc message type' -a '
command\t"Payload is a command"
get_workspaces\t"Get current workspace"
get_outputs\t"Get current outputs"
get_tree\t"Get layout tree"
get_marks\t"Get list of marks"
get_bar_config\t"Get list of configured binding modes"
get_version\t"Get i3 version"
command\t"Payload is a command"
get_workspaces\t"Get current workspace"
get_outputs\t"Get current outputs"
get_tree\t"Get layout tree"
get_marks\t"Get list of marks"
get_bar_config\t"Get list of configured binding modes"
get_version\t"Get i3 version"
'

View File

@@ -3,49 +3,49 @@ complete -c mono -s h -l help -d 'Show help'
complete -c mono -s V -l version -a number -f -d 'Show version'
complete -c mono -l aot -a '(__fish_append , \\
asmonly\t"Instruct the AOT compiler to output assembly code instead of an object file" \\
bind-to-runtime-version\t"Force the generated AOT files to be bound to the runtime version of the compiling Mono" \\
data-outfile\t"Instruct the AOT code generator to output certain data constructs into a separate file" \\
direct-icalls\t"Invoke icalls directly instead of going through the operating system symbol lookup operation" \\
direct-pinvoke\t"Invoke PInvoke methods directly instead of going through the operating system symbol lookup operation" \\
dwarfdebug\t"Instruct the AOT compiler to emit DWARF debugging information" \\
full\t"Create binaries which can be used with the --full-aot option" \\
hybrid\t"Create binaries which can be used with the --hybrid-aot option" \\
llvm\t"Perform AOT with the LLVM backend instead of the Mono backend where possible" \\
llvmonly\t"Perform AOT with the LLVM backend exclusively and the Mono backend will not be used" \\
llvmopts\t"Specify flags to the built-in set of flags passed to the LLVM optimizer" \\
llvmllc\t"Specify flags to the built-in set of flags passed to the LLVM static compiler (llc)" \\
mcpu\t"Allow AOT mode to use all instructions current CPU supports" \\
dedup-include\t"Pass compilation where we compile the methods that we had previously skipped" \\
info\t"Print the architecture the AOT in this copy of Mono targets and quit" \\
interp\t"Generate all required wrappers, so that it is possible to run --interpreter without any code generation at runtime" \\
depfile\t"Output a gcc -M style dependency file" \\
ld-flags\t"Specify flags to pass to the C linker (if the current AOT mode calls for invoking it)" \\
llvm-path\t"Same for the llvm tools \\\'opt\\\' and \\\'llc\\\'" \\
msym-dir\t"Instruct the AOT compiler to generate offline sequence points .msym files" \\
mtriple\t"Use the GNU style target triple <TRIPLE> to determine some code generation options" \\
nimt-trampolines\t"Precreate IMT trampolines in the AOT image" \\
ngsharedvt-trampolines\t"Precreate value type generic sharing trampolines in the AOT image" \\
nodebug\t"Instruct the AOT compiler to not output any debugging information" \\
no-direct-calls\t"Prevent the AOT compiler from generating direct calls to a method" \\
nrgctx-trampolines\t"Precreate generic sharing trampolines in the AOT image" \\
nrgctx-fetch-trampolines\t"Precreate generic sharing fetch trampolines in the AOT image" \\
ntrampolines\t"Precreate method trampolines in the AOT image" \\
outfile\t"Instruct the AOT compiler to save the output to the specified file" \\
print-skipped-methods\t"Output the skipped methods to the console" \\
profile\t"Specify a file to use for profile-guided optimization" \\
profile-only\t"" \\
readonly-value\t"Override the value of a static readonly field" \\
save-temps,keep-temps\t"Instruct the AOT compiler to keep temporary files" \\
soft-debug\t"Instruct the compiler to generate sequence point checks" \\
static\t"Create an ELF object file (.o) or .s file which can be statically linked into an executable when embedding the mono runtime" \\
stats\t"Print various stats collected during AOT compilation" \\
temp-path\t"Specify path to store temporary files created during AOT compilation" \\
threads\t"Use multiple threads when compiling the methods" \\
tool-prefix\t"Prepend <PREFIX> to the name of tools ran by the AOT compiler" \\
verbose\t"Print additional information about type loading failures" \\
write-symbols,no-write-symbols\t"Instruct the AOT compiler to emit (or not emit) debug symbol information" \\
no-opt\t"Instruct the AOT compiler tot no call opt when compiling with LLVM")' \
asmonly\t"Instruct the AOT compiler to output assembly code instead of an object file" \\
bind-to-runtime-version\t"Force the generated AOT files to be bound to the runtime version of the compiling Mono" \\
data-outfile\t"Instruct the AOT code generator to output certain data constructs into a separate file" \\
direct-icalls\t"Invoke icalls directly instead of going through the operating system symbol lookup operation" \\
direct-pinvoke\t"Invoke PInvoke methods directly instead of going through the operating system symbol lookup operation" \\
dwarfdebug\t"Instruct the AOT compiler to emit DWARF debugging information" \\
full\t"Create binaries which can be used with the --full-aot option" \\
hybrid\t"Create binaries which can be used with the --hybrid-aot option" \\
llvm\t"Perform AOT with the LLVM backend instead of the Mono backend where possible" \\
llvmonly\t"Perform AOT with the LLVM backend exclusively and the Mono backend will not be used" \\
llvmopts\t"Specify flags to the built-in set of flags passed to the LLVM optimizer" \\
llvmllc\t"Specify flags to the built-in set of flags passed to the LLVM static compiler (llc)" \\
mcpu\t"Allow AOT mode to use all instructions current CPU supports" \\
dedup-include\t"Pass compilation where we compile the methods that we had previously skipped" \\
info\t"Print the architecture the AOT in this copy of Mono targets and quit" \\
interp\t"Generate all required wrappers, so that it is possible to run --interpreter without any code generation at runtime" \\
depfile\t"Output a gcc -M style dependency file" \\
ld-flags\t"Specify flags to pass to the C linker (if the current AOT mode calls for invoking it)" \\
llvm-path\t"Same for the llvm tools \\\'opt\\\' and \\\'llc\\\'" \\
msym-dir\t"Instruct the AOT compiler to generate offline sequence points .msym files" \\
mtriple\t"Use the GNU style target triple <TRIPLE> to determine some code generation options" \\
nimt-trampolines\t"Precreate IMT trampolines in the AOT image" \\
ngsharedvt-trampolines\t"Precreate value type generic sharing trampolines in the AOT image" \\
nodebug\t"Instruct the AOT compiler to not output any debugging information" \\
no-direct-calls\t"Prevent the AOT compiler from generating direct calls to a method" \\
nrgctx-trampolines\t"Precreate generic sharing trampolines in the AOT image" \\
nrgctx-fetch-trampolines\t"Precreate generic sharing fetch trampolines in the AOT image" \\
ntrampolines\t"Precreate method trampolines in the AOT image" \\
outfile\t"Instruct the AOT compiler to save the output to the specified file" \\
print-skipped-methods\t"Output the skipped methods to the console" \\
profile\t"Specify a file to use for profile-guided optimization" \\
profile-only\t"" \\
readonly-value\t"Override the value of a static readonly field" \\
save-temps,keep-temps\t"Instruct the AOT compiler to keep temporary files" \\
soft-debug\t"Instruct the compiler to generate sequence point checks" \\
static\t"Create an ELF object file (.o) or .s file which can be statically linked into an executable when embedding the mono runtime" \\
stats\t"Print various stats collected during AOT compilation" \\
temp-path\t"Specify path to store temporary files created during AOT compilation" \\
threads\t"Use multiple threads when compiling the methods" \\
tool-prefix\t"Prepend <PREFIX> to the name of tools ran by the AOT compiler" \\
verbose\t"Print additional information about type loading failures" \\
write-symbols,no-write-symbols\t"Instruct the AOT compiler to emit (or not emit) debug symbol information" \\
no-opt\t"Instruct the AOT compiler tot no call opt when compiling with LLVM")' \
-f -d 'Precompile CIL code to native code'
complete -c mono -l aot-path -d 'Show additional directories to search for AOT images'
@@ -58,13 +58,13 @@ complete -c mono -l attach -a disable -f -d 'Disable the attach functionality'
complete -c mono -l config -d 'Read configuration from file instead of using default one'
complete -c mono -l debugger-agent -a '(__fish_append , \\
address\t"Specify the IP address where your debugger client is listening to" \\
loglevel\t"Specify the diagnostics log level for" \\
logfile\t"Instruct the AOT code generator to output certain data constructs into a separate file" \\
server\t"Specify the file where the log will be stored, it defaults to standard output" \\
setpgid\t"If set to yes, Mono will call setpgid(0, 0) on startup" \\
suspend\t"Suspend the vm on startup until it connects successfully to a debugger front end" \\
transport\t"Specify the transport that the debugger will use to communicate")' \
address\t"Specify the IP address where your debugger client is listening to" \\
loglevel\t"Specify the diagnostics log level for" \\
logfile\t"Instruct the AOT code generator to output certain data constructs into a separate file" \\
server\t"Specify the file where the log will be stored, it defaults to standard output" \\
setpgid\t"If set to yes, Mono will call setpgid(0, 0) on startup" \\
suspend\t"Suspend the vm on startup until it connects successfully to a debugger front end" \\
transport\t"Specify the transport that the debugger will use to communicate")' \
-f -d 'Use a debugging agent inside the Mono runtime and connect it to a client user interface'
complete -c mono -l desktop \
@@ -84,30 +84,30 @@ complete -c mono -l llvm -d 'Use the LLVM optimization and code generation engin
complete -c mono -l ffast-math -d 'Use Mono and LLVM aggressive floating point optimizations'
complete -c mono -s o -l optimize -a '(__fish_append , \\
abcrem\t"Array bound checks removal" \\
all\t"Turn on all optimizations" \\
aot\t"Usage of Ahead Of Time compiled code" \\
branch\t"Branch optimizations" \\
cfold\t"Constant folding" \\
cmov\t"Conditional moves [arch-dependency]" \\
deadce\t"Dead code elimination" \\
consprop\t"Constant propagation" \\
copyprop\t"Copy propagation" \\
fcmov\t"Fast x86 FP compares [arch-dependency]" \\
float32\t"Perform 32-bit float arithmetic using 32-bit operations" \\
gshared\t"Enable generic code sharing" \\
inline\t"Inline method calls" \\
intrins\t"Intrinsic method implementations" \\
linears\t"Linear scan global reg allocation" \\
leaf\t"Leaf procedures optimizations" \\
loop\t"Loop related optimizations" \\
peephole\t"Peephole postpass" \\
precomp\t"Precompile all methods before executing Main" \\
sched\t"Instruction scheduling" \\
shared\t"Emit per-domain code" \\
sse2\t"SSE2 instructions on x86 [arch-dependency]" \\
tailc\t"Tail recursion and tail calls" \\
transport\t"Specify the transport that the debugger will use to communicate")' \
abcrem\t"Array bound checks removal" \\
all\t"Turn on all optimizations" \\
aot\t"Usage of Ahead Of Time compiled code" \\
branch\t"Branch optimizations" \\
cfold\t"Constant folding" \\
cmov\t"Conditional moves [arch-dependency]" \\
deadce\t"Dead code elimination" \\
consprop\t"Constant propagation" \\
copyprop\t"Copy propagation" \\
fcmov\t"Fast x86 FP compares [arch-dependency]" \\
float32\t"Perform 32-bit float arithmetic using 32-bit operations" \\
gshared\t"Enable generic code sharing" \\
inline\t"Inline method calls" \\
intrins\t"Intrinsic method implementations" \\
linears\t"Linear scan global reg allocation" \\
leaf\t"Leaf procedures optimizations" \\
loop\t"Loop related optimizations" \\
peephole\t"Peephole postpass" \\
precomp\t"Precompile all methods before executing Main" \\
sched\t"Instruction scheduling" \\
shared\t"Emit per-domain code" \\
sse2\t"SSE2 instructions on x86 [arch-dependency]" \\
tailc\t"Tail recursion and tail calls" \\
transport\t"Specify the transport that the debugger will use to communicate")' \
-f -d 'Use optimizations'
complete -c mono -l response -d 'Use a response file'
@@ -119,9 +119,9 @@ complete -c mono -l verify-all \
# Development options
complete -c mono -l debug -a '(__fish_append , \\
casts\t"Produce a detailed error when throwing a InvalidCastException" \\
mdb-optimizations\t"Disable some JIT optimizations which are usually only disabled when running inside the debugger" \\
gdb\t"Generate and register debugging information with gdb")' \
casts\t"Produce a detailed error when throwing a InvalidCastException" \\
mdb-optimizations\t"Disable some JIT optimizations which are usually only disabled when running inside the debugger" \\
gdb\t"Generate and register debugging information with gdb")' \
-f -d 'Use the debugging mode in the runtime'
complete -c mono -l profile -f -d 'Use a profiler module with the given arguments'

View File

@@ -19,9 +19,13 @@ complete -c mtr -s p -l split -d 'Split output'
complete -c mtr -s n -l no-dns -d 'Do not resolve host names'
complete -c mtr -s b -l show-ips -d 'Show IP numbers and host names'
complete -c mtr -s o -l order -d 'Select output fields' -x
complete -c mtr -s y -l ipinfo -d 'Select IP information in output' -x -a \
'0\t"AS number" 1\t"IP prefix" 2\t"Country code" 3\t"RIR organization"\
4\t"Allocation date of the IP prefix"'
complete -c mtr -s y -l ipinfo -d 'Select IP information in output' -x -a '
0\t"AS number"
1\t"IP prefix"
2\t"Country code"
3\t"RIR organization"
4\t"Allocation date of the IP prefix"
'
complete -c mtr -s z -l aslookup -d 'Display AS number'
complete -c mtr -s i -l interval -d 'ICMP echo request interval (sec)' -x
complete -c mtr -s c -l report-cycles -d 'Set the number of pings sent' -x

View File

@@ -3,15 +3,16 @@ set -l uname (uname -s)
## GNU mv
if mv --version >/dev/null 2>/dev/null
# --backup requires an argument, -b does not accept an argument
complete -c mv -l backup -r -d "Backup each existing destination file" \
-x -ka "none\t'Never make backups'
off\t'Never make backups'
numbered\t'Make numbered backups'
t\t'Make numbered backups'
existing\t'Numbered backups if any exist, else simple'
nil\t'Numbered backups if any exist, else simple'
simple\t'Make simple backups'
never\t'Make simple backups'"
complete -c mv -l backup -r -d "Backup each existing destination file" -x -ka "
none\t'Never make backups'
off\t'Never make backups'
numbered\t'Make numbered backups'
t\t'Make numbered backups'
existing\t'Numbered backups if any exist, else simple'
nil\t'Numbered backups if any exist, else simple'
simple\t'Make simple backups'
never\t'Make simple backups'
"
complete -c mv -s b -d "Backup each existing destination file"
complete -c mv -s f -l force -d "Don't prompt to overwrite"
complete -c mv -s i -l interactive -d "Prompt to overwrite"

View File

@@ -1,3 +1 @@
complete -c ps2pdf -k -x -a "(
__fish_complete_suffix .ps
)"
complete -c ps2pdf -k -x -a "(__fish_complete_suffix .ps)"

View File

@@ -33,9 +33,10 @@ complete -f -c string -n "test (count (commandline -xpc)) -lt 2" -a unescape
complete -f -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] escape; or contains -- (commandline -xpc)[2] unescape" -s n -l no-quoted -d "Escape with \\ instead of quotes"
complete -x -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] escape; or contains -- (commandline -xpc)[2] unescape" -l style -d "Specify escaping style" -xa "
(printf '%s\t%s\n' script 'For use in scripts' \
var 'For use as a variable name' \
regex 'For string match -r, string replace -r' \
url 'For use as a URL')"
var 'For use as a variable name' \
regex 'For string match -r, string replace -r' \
url 'For use as a URL')
"
complete -f -c string -n "test (count (commandline -xpc)) -lt 2" -a match
complete -f -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] match" -s n -l index -d "Report index, length of match"
complete -f -c string -n "test (count (commandline -xpc)) -ge 2" -n "contains -- (commandline -xpc)[2] match" -s v -l invert -d "Report only non-matches"

View File

@@ -18,7 +18,7 @@ function __fish_complete_sv_list_services
set -q svdir[1]; or return
set -l services (path basename -- $svdir[1]/*)
set -l sv_status (sv status $services 2>/dev/null |
string replace -ar ';.*$' '')
string replace -ar ';.*$' '')
and string replace -r "^(\w+: )(.*?):" '$2\t$1' $sv_status
or printf "%s\n" $services
end

View File

@@ -14,8 +14,9 @@ complete -c update-eix-remote -s o -d "Use the given PATH as $OVERLAYPARENT"
# Subcommands
set -l subcmds "
"
complete -c update-eix-remote -xa \
'update\t"Fetch the eix-caches of some layman overlays into a temporary file resp. into FILE and add them to the eix database"
fetch\t"Only fetch the overlays into FILE"
add\t"Only add the overlays from FILE to the eix database"
remove\t"Remove all temporarily added virtual overlays from the eix database"'
complete -c update-eix-remote -xa '
update\t"Fetch the eix-caches of some layman overlays into a temporary file resp. into FILE and add them to the eix database"
fetch\t"Only fetch the overlays into FILE"
add\t"Only add the overlays from FILE to the eix database"
remove\t"Remove all temporarily added virtual overlays from the eix database"
'

View File

@@ -469,9 +469,9 @@ fn test_autoload() {
macro_rules! run {
( $fmt:expr $(, $arg:expr )* $(,)? ) => {
let cmd = wcs2zstring(&sprintf!($fmt $(, $arg)*));
let status = unsafe { libc::system(cmd.as_ptr()) };
assert_eq!(status, 0);
let cmd = wcs2zstring(&sprintf!($fmt $(, $arg)*));
let status = unsafe { libc::system(cmd.as_ptr()) };
assert_eq!(status, 0);
};
}

View File

@@ -654,13 +654,12 @@ pub fn read(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> Bui
streams.stdin_fd(),
);
} else if opts.nchars.is_none() && !stream_stdin_is_a_tty &&
// "one_line" is implemented as reading n-times to a new line,
// if we're chunking we could get multiple lines so we would have to advance
// more than 1 per run through the loop. Let's skip that for now.
!opts.one_line &&
(
streams.stdin_is_directly_redirected ||
unsafe {libc::lseek(streams.stdin_fd(), 0, SEEK_CUR)} != -1)
// "one_line" is implemented as reading n-times to a new line,
// if we're chunking we could get multiple lines so we would have to advance
// more than 1 per run through the loop. Let's skip that for now.
!opts.one_line &&
(streams.stdin_is_directly_redirected ||
unsafe {libc::lseek(streams.stdin_fd(), 0, SEEK_CUR)} != -1)
{
// We read in chunks when we either can seek (so we put the bytes back),
// or we have the bytes to ourselves (because it's directly redirected).

View File

@@ -758,9 +758,12 @@ pub fn parse_args(
if !parser.errors.is_empty() {
err.push_utfstr(&parser.errors[0]);
} else {
sprintf!(=> err, "unexpected argument at index %u: '%s'",
result.as_ref().unwrap().range().end + 1,
args[result.as_ref().unwrap().range().end]);
sprintf!(
=> err,
"unexpected argument at index %u: '%s'",
result.as_ref().unwrap().range().end + 1,
args[result.as_ref().unwrap().range().end],
);
}
err.push('\n');
err.push_utfstr(&commandline);

View File

@@ -265,7 +265,7 @@ pub(crate) fn safe_report_exec_error(
flog_safe!(
exec,
"Hint: Your exported variables take up over half the limit. Try \
erasing or unexporting variables."
erasing or unexporting variables."
);
}
} else {
@@ -294,7 +294,7 @@ pub(crate) fn safe_report_exec_error(
flog_safe!(
exec,
"fish scripts require an interpreter directive (must \
start with '#!/path/to/fish')."
start with '#!/path/to/fish')."
);
} else {
// If the shebang line exists, we would get an ENOENT or similar instead,

View File

@@ -968,14 +968,14 @@ pub fn rendering_needs_update(&self, rendering: &PageRendering) -> bool {
}
(self.is_empty() && !rendering.screen_data.is_empty()) || // Do update after clear().
rendering.term_width != Some(self.available_term_width) ||
rendering.term_height != Some(self.available_term_height) ||
rendering.selected_completion_idx !=
self.visual_selected_completion_index(rendering.rows, rendering.cols) ||
rendering.search_field_shown != self.search_field_shown ||
*rendering.search_field_line.text() != *self.search_field_line.text() ||
rendering.search_field_line.position() != self.search_field_line.position() ||
(rendering.remaining_to_disclose > 0 && self.fully_disclosed)
rendering.term_width != Some(self.available_term_width) ||
rendering.term_height != Some(self.available_term_height) ||
rendering.selected_completion_idx !=
self.visual_selected_completion_index(rendering.rows, rendering.cols) ||
rendering.search_field_shown != self.search_field_shown ||
*rendering.search_field_line.text() != *self.search_field_line.text() ||
rendering.search_field_line.position() != self.search_field_line.position() ||
(rendering.remaining_to_disclose > 0 && self.fully_disclosed)
}
// Updates the rendering.

View File

@@ -150,7 +150,7 @@ pub fn from_exit_code(ret: i32) -> ProcStatus {
assert!(
ret >= 0,
"trying to create proc_status_t from failed waitid()/waitpid() call \
or invalid builtin exit code!"
or invalid builtin exit code!"
);
const {

View File

@@ -305,10 +305,10 @@ pub fn terminal_init(vars: &dyn Environment, inputfd: RawFd) -> TerminalInitResu
warning,
wgettext_fmt!(
"%s could not read response to Primary Device Attribute query after waiting for %d seconds. \
This is often due to a missing feature in your terminal. \
See 'help %s' or 'man fish-terminal-compatibility'. \
This %s process will no longer wait for outstanding queries, \
which disables some optional features.",
This is often due to a missing feature in your terminal. \
See 'help %s' or 'man fish-terminal-compatibility'. \
This %s process will no longer wait for outstanding queries, \
which disables some optional features.",
program,
LONG_READ_TIMEOUT.as_secs(),
help_section!("terminal-compatibility"),

View File

@@ -401,7 +401,7 @@ fn setup(direction: MoveWordDir, line: &str) -> (WString, VecDeque<usize>, usize
}
macro_rules! validate {
($direction:expr, $style:expr, $line:expr) => {
($direction:expr, $style:expr, $line:expr) => {
let direction = $direction;
let (command, mut stops, mut idx, end) = setup(direction, $line);
assert!(!command.is_empty());
@@ -438,7 +438,7 @@ macro_rules! validate {
stops.is_empty(),
"expected to stop at {stops:?} but not. String: {command:?}"
);
}
}
}
use MoveWordDir::*;

View File

@@ -594,7 +594,7 @@ pub fn autoscroll(&mut self, screen_height: usize) {
flogf!(
reader,
"printing %u lines at y=%u would exceed window height (%u); \
assuming the extra lines have been pushed to scrollback, setting screen y to %d",
assuming the extra lines have been pushed to scrollback, setting screen y to %d",
actual_lines,
viewport_y,
screen_height,

View File

@@ -407,7 +407,7 @@ fn next(&mut self) -> Option<Self::Item> {
Some(result)
}
'{' if self.brace_statement_parser.as_ref()
.is_some_and(|parser| parser.at_command_position) =>
.is_some_and(|parser| parser.at_command_position) =>
{
self.brace_statement_parser.as_mut().unwrap().unclosed_brace_statements += 1;
let mut result = Tok::new(TokenType::LeftBrace);
@@ -492,7 +492,7 @@ fn next(&mut self) -> Option<Self::Item> {
// There's some duplication with the code in the default case below. The key
// difference here is that we must never parse these as a string; a failed
// redirection is an error!
match PipeOrRedir::try_from(buff) {
match PipeOrRedir::try_from(buff) {
Ok(redir_or_pipe) => {
if redir_or_pipe.fd < 0 {
Some(self.call_error(TokenizerError::InvalidRedirect, self.token_cursor,

View File

@@ -54,9 +54,9 @@ foo hello
cat $tmpdir/fish_foo.txt |read foo
if test $foo = hello;
echo Test 2 pass
echo Test 2 pass
else
echo Test 2 fail
echo Test 2 fail
end
#CHECK: Test 2 pass
@@ -168,8 +168,8 @@ echo \UDE01
# Comments allowed in between lines (#1987)
echo before comment \
# comment
after comment
# comment
after comment
#CHECK: before comment after comment
# Backslashes are part of comments and do not join lines (#1255)
@@ -548,13 +548,13 @@ echo (echo hello\\)
# This used to be a parse error - #7866.
echo (echo foo;#)
)
)
# CHECK: foo
echo (echo bar #'
)
)
# CHECK: bar
echo (#"
echo baz)
echo baz)
# CHECK: baz
# Make sure we don't match up brackets within comments (#8022).

View File

@@ -564,7 +564,7 @@ complete -C'complete --command=mktemp' | string replace -rf '=mktemp\t.*' '=mkte
## Test token expansion in commandline -x
complete complete_make -f -a '(argparse C/directory= -- (commandline -xpc)[2..];
echo Completing targets in directory $_flag_C)'
echo Completing targets in directory $_flag_C)'
var=path/to complete -C'complete_make -C "$var/build-directory" '
# CHECK: Completing targets in directory path/to/build-directory
var1=path complete -C'var2=to complete_make -C "$var1/$var2/other-build-directory" '

View File

@@ -91,14 +91,14 @@ if test -e /dev/full
echo "Wrong status when writing to /dev/full"
end
# Here the builtin should fail with status 2,
# and also the write should fail with status 1.
# The builtin has precedence.
builtin string --not-a-valid-option 2> /dev/full
if test $status -ne 2
echo "Wrong status for failing builtin"
end
echo "Failed write tests finished"
# Here the builtin should fail with status 2,
# and also the write should fail with status 1.
# The builtin has precedence.
builtin string --not-a-valid-option 2> /dev/full
if test $status -ne 2
echo "Wrong status for failing builtin"
end
echo "Failed write tests finished"
else
echo "Failed write tests skipped"
echo "write: skipped" 1>&2