Compare commits

..

33 Commits

Author SHA1 Message Date
Johannes Altmanninger
ef8e62727c Pass Parser by exclusive reference
As described in
https://github.com/fish-shell/fish-shell/pull/9990#discussion_r1382494440,
prior to 77aeb6a2a8 (Port execution, 2023-10-08), "Parser" was
passed by mutable reference ("parser_t&"), even though operation
context was passed as "const operation_context_t &".  This worked
because C++ doesn't propagate const to pointers by default (see
https://en.cppreference.com/cpp/experimental/propagate_const).

	class operation_context_t {
		std::shared_ptr<parser_t> parser;
		...
	};

So "*ctx->parser" was a "parser_t&", not "const parser_t&".

Rust has stricter const propagation rules which means that const
operation context can't simply hand out a non-const reference to parser.

To be able to port code without changing its structure,
77aeb6a2a8 passed "Parser" by shared reference, using interior
mutability (RefCell) to modify parser fields. This is a bit ugly
(c.f. https://doc.rust-lang.org/std/cell/index.html "interior mutability
is something of a last resort") and means that some borrowing conflicts
are not found at compile time but runtime.

Pass both parser and operation context by exclusive reference, and
remove the interior mutability wrappers from parser's fields.
Since "libdata" is no longer inside a "RefCell", add a "ScopedRefCell"
around "transient_commandline".

The downside is that "ScopeGuard" use can become more intrusive
when we pass "Parser" or "OperationContext" as context (especially
when we use "zelf" since we can't shadow "self"), see
* 2930466d53 (Introduce ScopedCell and ScopedRefCell, 2025-03-15)
* 29ae571afa (Make scoped_push nicer, 2024-12-28)
Avoid this in some cases, specifically when using "ScopedCell" or
"ScopedRefCell". Since "&mut Parser" prevents the "ScopeCell"'s
"ScopeGuard" from holding a shared reference, use an "Rc" to capture
a dynamically-checked reference to the Cell. We could also use raw
pointers instead.

Change "Completer::apply_var_assignments" to return  a block ID, to
avoid the need to return a "zelf" "ScopeGuard".  In future, we could
probably untangle completer and get away with returning a "ScopeGuard"
called "ctx".

Closes #12694
2026-05-11 10:41:14 +08:00
Johannes Altmanninger
638777a4de Remove unused ScopeGuarding trait
As of commit 0441bdc634 (Remove ScopeGuard::commit in favor of drop,
2026-04-30), this trait is empty so there's not much use having it
for now.
2026-05-11 10:41:14 +08:00
Johannes Altmanninger
6705d27f93 Remove unused ScopeGuard::cancel() 2026-05-11 10:41:14 +08:00
Johannes Altmanninger
ef626cfdf9 uvar migration: clarify it's about 4.3 or higher 2026-05-11 10:41:14 +08:00
Johannes Altmanninger
30976d8970 uvar migration: recogize more historical defaults as such
During our one-time migration away from universal variables,
we create ~/.config/fish/conf.d/fish_frozen_theme.fish
if we think that the current theme is different from the default.

The default uvar-backed theme had changed over time, but existing
installations would not be upgraded.  Because of this, we have
a heuristic that assumes that values coinciding with historical
default values also stem from a default.  Some historical values are
missing. Add them.

There are more left, see 03b23dd1b6 (Update default colors,
2022-01-27).

Fixes #12725
2026-05-11 10:41:14 +08:00
Johannes Altmanninger
d601ceb55b fish_command_not_found: move non-interactive logic
In non-interactive shells we only ever use our simple command-not-found
handler; the fancy ones are only intended for interactive shells, see
537ab32dd9 (Add support for the Ubuntu 'command-no-found' handler,
which suggests a package to install in order to get a command.,
2008-01-15).

I'm not sure if this behavior difference is really a good idea,
but I guess we can avoid rocking the boat for now.

Make the implementation less surprising by moving it into the obvious
file. No behavior change intended.
2026-05-11 10:41:14 +08:00
Johannes Altmanninger
6e036740de fish_command_not_found: remove legacy event handler
We no longer emit the "fish_command_not_found" event ourselves,
so the event handlers are only useful to users who
1. run "emit fish_command_not_found"
2. copy the definition of "fish_command_not_found" to their config and run
   that with fish < 3.2.

Probably no one does 1; there are no matches in
https://github.com/search?utf8=%E2%9C%93&q=%22emit+fish_command_not_found%22+language%3Afish&type=code

Reason 2 is less relevant after 5 years.

For additional evidence, none of our specializations
("/usr/libexec/pk-command-not-found" etc.)  react to the event,
and no one has ever complained.

Stop registering any fish_command_not_found as event handler,
for consistency and simplicity.

While at it, remove the documentation on how to make it work for
version < 3.2.
2026-05-11 10:24:12 +08:00
Johannes Altmanninger
e25ebf1067 handle_command_not_found: extract constant 2026-05-11 10:24:12 +08:00
Johannes Altmanninger
1f870b360a fish_command_not_found: deduplicate /etc/os-release regex 2026-05-11 10:24:12 +08:00
Johannes Altmanninger
c1a6f6ddc8 fish_command_not_found: remove duplicate function definition 2026-05-11 10:24:12 +08:00
Johannes Altmanninger
184f4f6571 share: remove redundant continuation lines escaping 2026-05-11 10:24:12 +08:00
Johannes Altmanninger
3dc36f74bc Don't print greetings in interactive read in fake-interactive shell
If a user passes "-i" when running a script, they ought to expect
weird behavior i.e. fish might run the user's interactive-only
configuration which might print things to TTY etc.  But at least
for our part of the configuration, we can avoid depending on the
user-settable interactive bit.

__fish_config_interactive is already only called when we paint the
first prompt, either for a prompt (which implies we're an interactive
shell) or for builtin read (which does not imply anything about the
interactivity of the shell).

Only print greetings when not in interactive read. Notably, "status
is-interactive-read" is not overridable by the user.

This helps us get rid of more "status is-interactive" switches.
2026-05-11 10:21:56 +08:00
Johannes Altmanninger
9374410bb6 fish_git_prompt: remove checks for interactive bit
The "if status is-interactive" was added by ae593decfc (Replace
__fish_git_branch_prompt.fish with __fish_git_prompt.fish, 2012-06-20)
presumably to avoid repaints in noninteractive cases.  The repaints
have been removed in 76457bdc4e (fish_git_prompt: Remove repaint
from variable handlers, 2021-03-04) so this is no longer necessary.
2026-05-11 10:21:56 +08:00
Johannes Altmanninger
1e0ff8712d share: use "status is-*" instead of old-school "status --is-*" 2026-05-11 10:21:56 +08:00
Nahor
e697f960c8 windows build: disable lint checks
There is already a GitHub workflow doing lint checks so it is redundant
and wastes time (4+ min).
 
Moreover, other platforms do not do it, so when it fails, it gives
the appearance that there is a Windows specific build issue beyond
linting.

Closes #12740
2026-05-10 23:52:47 +02:00
Daniel Rainer
cab3bdabc4 l10n: update PO files 2026-05-10 15:18:40 +02:00
Fabian Boehm
5c6acdee09 string shorten: Don't produce output with --quiet
This would've printed stuff in case it didn't have to shorten (which
means it "failed" because the logic is "did something").

Fixes #12732
2026-05-10 11:16:41 +02:00
huaji2369
a9cc505d62 completions/waydroid:
add completions for adb/bugreport
add package name completions for app launch/remove
replace all -fr with -x
2026-05-09 21:55:20 -07:00
Nahor
6c6b53cdd8 check.sh: on Cygwin, only re-run the tests that mention ln
On Cygwin, check.sh was running all the tests twice, one with symlinks
enabled, and one without. But most tests do no use symlinks so
re-running those does not test anything new and it's just a major waste
of resources and time (and cygwin is quite slow already).
So only re-run the tests that use symlinks, i.e. that use `ln`.

Filter on mentions of `ln` and not `cygwin_nosymlink` because the latter
is only needed when a test would fail in one of the two scenarios, and
not all tests with symlinks do.
2026-05-09 20:38:50 -07:00
Remo Senekowitsch
f5ff9aac2b completions/dive: add image tags from podman 2026-05-09 20:20:11 -07:00
Remo Senekowitsch
0ddad4fcb1 completions/dive: use upstream completions for builtins 2026-05-09 20:20:11 -07:00
Justin Su
7d1604a116 docs/read: Clarify that --null cannot be used with --line
Fixes issue #12726
2026-05-09 20:04:33 -07:00
Peter Ammon
aa5ecd0efa Make the tmux-history-search2 test more reliable 2026-05-09 18:37:07 -07:00
David Adam
0fafff2c89 CMake: stop installing embedded files
Completions, functions, tools, and various ancillary files have been
shipped within the fish binary for some time. We don't need two copies
in packages, plus some of them are never read from the filesystem.
2026-05-10 02:06:04 +08:00
Johannes Altmanninger
1b18d08611 Fix zellij completions
Note that on some distros, this is shadowed by
/usr/share/fish/vendor_completions.d/zellij.fish.
2026-05-08 01:33:49 +08:00
Johannes Altmanninger
5a2e9f4f3c build_tools/release.sh: update milestones even when pushing fails 2026-05-08 01:33:49 +08:00
Johannes Altmanninger
c592b5d957 start new cycle
Created by ./build_tools/release.sh 4.7.1
2026-05-08 01:33:49 +08:00
Johannes Altmanninger
77285d46b8 Merge tag 4.7.1 2026-05-08 01:33:49 +08:00
Remo Senekowitsch
4296e9bd75 completions/zellij: add upstream completions
Closes #12723
2026-05-07 17:52:21 +02:00
Remo Senekowitsch
894ca81464 completions/mise: add upstream completions
Part of #12723
2026-05-07 17:52:16 +02:00
Remo Senekowitsch
7c53bded3a completions/chezmoi: add upstream completions
Part of #12723
2026-05-07 17:52:00 +02:00
Remo Senekowitsch
163f25d516 completions/niri: add upstream completions
Part of #12723
2026-05-07 17:51:44 +02:00
Remo Senekowitsch
d8e73d2263 completions/just: use upstream completions
Closes #12722
2026-05-07 17:51:21 +02:00
127 changed files with 1298 additions and 1354 deletions

View File

@@ -170,5 +170,7 @@ jobs:
run: |
cargo build
- name: tests
env:
FISH_CHECK_LINT: false
run: |
cargo xtask check

View File

@@ -1,3 +1,11 @@
fish ?.?.? (released ???)
=========================
Interactive improvements
------------------------
- On the first run after upgrading from an older version, fish will try harder to check if the current theme matches a historical default, in which case fish won't create ``~/.config/fish/conf.d/fish_frozen_theme.fish``.
This means that on systems where fish version 3.x was installed originally, the update will avoid creating that file (:issue:`12725`).
fish 4.7.1 (released May 08, 2026)
==================================

View File

@@ -132,21 +132,26 @@ if $lint; then
cargo doc --workspace --no-deps
fi
# Using "()" not "{}" because we do want a subshell (for the export)
system_tests() (
# shellcheck disable=2163
[ -n "$*" ] && export "$@"
"$workspace_root/tests/test_driver.py" "$build_dir"
)
system_tests() {
"$workspace_root/tests/test_driver.py" "$build_dir" "$@"
}
if $is_cygwin; then
# shellcheck disable=2059
printf "=== Running ${green}integration tests ${yellow}with${green} symlinks${reset}\n"
system_tests "$cygwin_var"=winsymlinks
(
export "$cygwin_var"=winsymlinks
system_tests
)
# shellcheck disable=2059
printf "=== Running ${green}integration tests ${yellow}without${green} symlinks${reset}\n"
system_tests "$cygwin_var"=
(
# Only redo the tests that use `ln` to saves some time
export "$cygwin_var"=
# shellcheck disable=2046
system_tests $(grep -l -E '\bln\b' -r tests/checks/)
)
else
# shellcheck disable=2059
printf "=== Running ${green}integration tests${reset}\n"

View File

@@ -255,6 +255,28 @@ do
sleep 20
done
milestone_version="$(
if echo "$version" | grep -q '\.0$'; then
echo "$minor_version"
else
echo "$version"
fi
)"
milestone_number() {
gh_api_repo milestones?state=open |
jq --arg name "fish $1" '
.[] | select(.title == $name) | .number
'
}
gh_api_repo milestones/"$(milestone_number "$milestone_version")" \
--method PATCH --raw-field state=closed
next_minor_version=$(echo "$minor_version" |
awk -F. '{ printf "%s.%s", $1, $2+1 }')
if [ -z "$(milestone_number "$next_minor_version")" ]; then
gh_api_repo milestones --method POST \
--raw-field title="fish $next_minor_version"
fi
(
cd "$fish_site"
make new-release
@@ -290,29 +312,6 @@ EOF
git push "$remote" HEAD:master
} fi
milestone_version="$(
if echo "$version" | grep -q '\.0$'; then
echo "$minor_version"
else
echo "$version"
fi
)"
milestone_number() {
gh_api_repo milestones?state=open |
jq --arg name "fish $1" '
.[] | select(.title == $name) | .number
'
}
gh_api_repo milestones/"$(milestone_number "$milestone_version")" \
--method PATCH --raw-field state=closed
next_minor_version=$(echo "$minor_version" |
awk -F. '{ printf "%s.%s", $1, $2+1 }')
if [ -z "$(milestone_number "$next_minor_version")" ]; then
gh_api_repo milestones --method POST \
--raw-field title="fish $next_minor_version"
fi
exit
}

View File

@@ -104,20 +104,12 @@ fish_create_dirs(${sysconfdir}/fish/conf.d ${sysconfdir}/fish/completions
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
${rel_datadir}/fish
${rel_datadir}/fish/man/man1
)
# This file is embedded in the executable by rust-embed and never read from the filesystem
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
)
# Create only the vendor directories inside the prefix (#5029 / #6508)
fish_create_dirs(
@@ -145,30 +137,6 @@ install(
DESTINATION ${rel_datadir}/pkgconfig
)
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/prompts/
DESTINATION ${rel_datadir}/fish/prompts
FILES_MATCHING PATTERN "*.fish"
)
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(
@@ -179,22 +147,6 @@ install(
PATTERN ${CONDEMNED_PAGE} EXCLUDE
)
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"
)
# Building the man pages is optional: if Sphinx isn't installed, they're not built
install(FILES ${MANUALS} DESTINATION ${mandir}/man1/ OPTIONAL)
install(

View File

@@ -17,6 +17,7 @@
fd::{AsRawFd, BorrowedFd, RawFd},
unix::ffi::OsStrExt as _,
},
rc::Rc,
sync::{
Arc, LazyLock,
atomic::{AtomicI32, AtomicU32, Ordering},
@@ -1184,10 +1185,10 @@ pub fn restore_term_foreground_process_group_for_exit() {
}
}
/// A wrapper around Cell which supports modifying the contents, scoped to a region of code.
/// This provides a somewhat nicer API than ScopedRefCell because you can directly modify the value,
/// instead of requiring an accessor function which returns a mutable reference to a field.
pub struct ScopedCell<T>(Cell<T>);
/// A wrapper around `Rc<Cell>` which supports modifying the contents, scoped to a region of code.
/// This provides a somewhat nicer API than ScopedRefCell because you can directly modify the
/// value, instead of requiring an accessor function which returns a mutable reference to a field.
pub struct ScopedCell<T>(Rc<Cell<T>>);
impl<T> Deref for ScopedCell<T> {
type Target = Cell<T>;
@@ -1197,15 +1198,9 @@ fn deref(&self) -> &Self::Target {
}
}
impl<T> DerefMut for ScopedCell<T> {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl<T: Copy> ScopedCell<T> {
pub fn new(value: T) -> Self {
Self(Cell::new(value))
Self(Rc::new(Cell::new(value)))
}
/// Temporarily modify a value in the ScopedCell, restoring it when the returned object is dropped.
@@ -1229,19 +1224,22 @@ pub fn new(value: T) -> Self {
/// // Restored after scope
/// assert_eq!(cell.get(), 5);
/// ```
pub fn scoped_mod<'a, Modifier: FnOnce(&mut T)>(
&'a self,
pub fn scoped_mod<Modifier: FnOnce(&mut T)>(
&self,
modifier: Modifier,
) -> impl ScopeGuarding + 'a {
) -> impl DerefMut + use<T, Modifier> {
let mut val = self.get();
modifier(&mut val);
let saved = self.replace(val);
ScopeGuard::new(self, move |cell| cell.set(saved))
let inner = Rc::clone(&self.0);
ScopeGuard::new((), move |()| inner.set(saved))
}
}
/// A wrapper around RefCell which supports modifying the contents, scoped to a region of code.
pub struct ScopedRefCell<T>(RefCell<T>);
/// A wrapper around `Rc<RefCell>` which supports modifying the contents, scoped to a region
/// of code.
#[derive(Default)]
pub struct ScopedRefCell<T>(Rc<RefCell<T>>);
impl<T> Deref for ScopedRefCell<T> {
type Target = RefCell<T>;
@@ -1251,15 +1249,9 @@ fn deref(&self) -> &Self::Target {
}
}
impl<T> DerefMut for ScopedRefCell<T> {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl<T> ScopedRefCell<T> {
pub fn new(value: T) -> Self {
Self(RefCell::new(value))
Self(Rc::new(RefCell::new(value)))
}
/// Temporarily modify a field in the ScopedRefCell, restoring it when the returned guard is dropped.
@@ -1286,19 +1278,20 @@ pub fn new(value: T) -> Self {
/// // Restored after scope
/// assert_eq!(cell.borrow().flag, false);
/// ```
pub fn scoped_set<'a, Accessor, Value: 'a>(
&'a self,
pub fn scoped_set<Accessor, Value>(
&self,
value: Value,
accessor: Accessor,
) -> impl ScopeGuarding + 'a
) -> impl DerefMut + use<T, Accessor, Value>
where
Accessor: Fn(&mut T) -> &mut Value + 'a,
Accessor: Fn(&mut T) -> &mut Value,
{
let mut data = self.borrow_mut();
let mut saved = std::mem::replace(accessor(&mut data), value);
ScopeGuard::new(self, move |cell| {
let mut data = cell.borrow_mut();
std::mem::swap((accessor)(&mut data), &mut saved);
let inner = Rc::clone(&self.0);
ScopeGuard::new((), move |()| {
let mut inner = inner.borrow_mut();
std::mem::swap((accessor)(&mut inner), &mut saved);
})
}
@@ -1320,7 +1313,7 @@ pub fn scoped_set<'a, Accessor, Value: 'a>(
///
/// assert_eq!(*cell.borrow(), 10);
/// ```
pub fn scoped_replace<'a>(&'a self, value: T) -> impl ScopeGuarding + 'a {
pub fn scoped_replace(&self, value: T) -> impl DerefMut + use<T> {
self.scoped_set(value, |s| s)
}
}
@@ -1359,12 +1352,6 @@ impl<T, F: FnOnce(T)> ScopeGuard<T, F> {
pub fn new(value: T, on_drop: F) -> Self {
Self(Some((value, on_drop)))
}
/// Cancels the invocation of the callback, returning the original wrapped value.
pub fn cancel(mut guard: Self) -> T {
let (value, _) = guard.0.take().expect("Should always have Some value");
value
}
}
impl<T, F: FnOnce(T)> Deref for ScopeGuard<T, F> {
@@ -1389,13 +1376,6 @@ fn drop(&mut self) {
}
}
/// A trait expressing what ScopeGuard can do. This is necessary because our scoped cells return an
/// `impl Trait` object and therefore methods on ScopeGuard which take a self parameter cannot be
/// used.
pub trait ScopeGuarding: DerefMut + Sized {}
impl<T, F: FnOnce(T)> ScopeGuarding for ScopeGuard<T, F> {}
pub const fn assert_send<T: Send>() {}
pub const fn assert_sync<T: Sync>() {}

View File

@@ -50,25 +50,3 @@ Or the simple default handler::
function fish_command_not_found
__fish_default_command_not_found_handler $argv
end
Backwards compatibility
-----------------------
This command was introduced in fish 3.2.0. Previous versions of fish used the "fish_command_not_found" :ref:`event <event>` instead.
To define a handler that works in older versions of fish as well, define it the old way::
function __fish_command_not_found_handler --on-event fish_command_not_found
echo COMMAND WAS NOT FOUND MY FRIEND $argv[1]
end
in which case fish will define a ``fish_command_not_found`` that calls it,
or define a wrapper::
function fish_command_not_found
echo "G'day mate, could not find your command: $argv"
end
function __fish_command_not_found_handler --on-event fish_command_not_found
fish_command_not_found $argv
end

View File

@@ -95,7 +95,7 @@ The following options control how much is read and how it is stored:
Marks the end of the line with the NUL character, instead of newline. This also disables interactive mode.
**-L** or **--line**
Reads each line into successive variables, and stops after each variable has been filled. This cannot be combined with the ``--delimiter`` option.
Reads each line into successive variables, and stops after each variable has been filled. This cannot be combined with the ``--null`` option, or options to control splitting like ``--delimiter``.
Without the ``--line`` option, ``read`` reads a single line of input from standard input, breaks it into tokens, and then assigns one token to each variable specified in *VARIABLES*. If there are more tokens than variables, the complete remainder is assigned to the last variable.

View File

@@ -150,7 +150,7 @@ By default, Fish searches the following for completions, using the first availab
- A directory for systems administrators to install completions for all users on the system, usually ``/etc/fish/completions``;
- A user-specified directory for third-party vendor completions, usually ``~/.local/share/fish/vendor_completions.d`` (controlled by the ``XDG_DATA_HOME`` environment variable);
- A directory for third-party software vendors to ship their own completions for their software, usually ``/usr/share/fish/vendor_completions.d``;
- The completions shipped with fish, usually installed in ``/usr/share/fish/completions``; and
- The completions shipped with fish, which are stored in the fish program and can be seen with ``status list-files``; and
- Completions automatically generated from the operating system's manual, usually stored in ``~/.cache/fish/generated_completions`` (controlled by ``XDG_CACHE_HOME`` environment variable).
These paths are controlled by parameters set at build, install, or run time, and may vary from the defaults listed above.

View File

@@ -9374,9 +9374,6 @@ msgstr ""
msgid "Build an RPM package"
msgstr ""
msgid "Build and analyze a Docker image from a Dockerfile"
msgstr ""
msgid "Build and install a new package"
msgstr "Ein neues Paket erstellen und installieren"
@@ -12233,9 +12230,6 @@ msgstr "Konfigurationsdatei"
msgid "Config and front matter format"
msgstr ""
msgid "Config file"
msgstr ""
msgid "Config file (default: $HOME/.s3cfg)"
msgstr ""
@@ -30341,9 +30335,6 @@ msgstr ""
msgid "Help for convert"
msgstr ""
msgid "Help for dive"
msgstr ""
msgid "Help for doc"
msgstr ""
@@ -30503,12 +30494,6 @@ msgstr ""
msgid "Higher-order task to perform other tasks in succession."
msgstr ""
msgid "Highest allowable bytes wasted"
msgstr ""
msgid "Highest allowable percentage of bytes wasted"
msgstr ""
msgid "Highest compression, same as -12"
msgstr ""
@@ -30860,9 +30845,6 @@ msgstr ""
msgid "Idiomatically format Dart source code"
msgstr ""
msgid "If CI=true in the environment, use the given yaml to drive validation rules"
msgstr ""
msgid "If HTTP proxy is used, make curl tunnel through it"
msgstr ""
@@ -31163,9 +31145,6 @@ msgstr ""
msgid "Ignore host and package architecture mismatch"
msgstr ""
msgid "Ignore image parsing errors and run the analysis anyway"
msgstr ""
msgid "Ignore inhibitor locks on shutdown or sleep"
msgstr ""
@@ -37094,9 +37073,6 @@ msgstr ""
msgid "Lower the volume by 8%"
msgstr ""
msgid "Lowest allowable image efficiency"
msgstr ""
msgid "MAC address"
msgstr ""
@@ -61313,12 +61289,6 @@ msgstr ""
msgid "Skip the given initial samples for each input {#|mm:ss.ss}"
msgstr ""
msgid "Skip the interactive TUI and validate against CI rules"
msgstr ""
msgid "Skip the interactive TUI and write the layer analysis statistics to a given file"
msgstr ""
msgid "Skip the normal function prologue and epilogue that sets up the stack-frame"
msgstr ""
@@ -66443,9 +66413,6 @@ msgstr ""
msgid "The connection protocol to use"
msgstr ""
msgid "The container engine to fetch the image from"
msgstr ""
msgid "The copy job is not persisted if VM is turned off"
msgstr ""
@@ -74381,6 +74348,9 @@ msgstr ""
msgid "configure the Salesforce CLI"
msgstr ""
msgid "connect adb to the Android container"
msgstr ""
msgid "connect to a custom bus"
msgstr ""
@@ -74471,6 +74441,9 @@ msgstr ""
msgid "create a backup of one or several jails"
msgstr ""
msgid "create a bugreport archive interactively"
msgstr ""
msgid "create a bundle for an Aura component or a Lightning web component"
msgstr ""
@@ -74819,6 +74792,9 @@ msgstr ""
msgid "discard uncommitted changes (no backup)"
msgstr ""
msgid "disconnect adb from the Android container"
msgstr ""
msgid "disconnect and wait for reassociate command before connecting"
msgstr ""
@@ -77057,6 +77033,9 @@ msgstr ""
msgid "make vendored copy of dependencies"
msgstr ""
msgid "manage adb connection"
msgstr ""
msgid "manage and query devices in the filesystem"
msgstr ""
@@ -78875,6 +78854,9 @@ msgstr ""
msgid "run as if started in dir"
msgstr ""
msgid "run as user mode, connecting to the remote initializer service"
msgstr ""
msgid "run command"
msgstr ""

View File

@@ -9374,9 +9374,6 @@ msgstr ""
msgid "Build an RPM package"
msgstr ""
msgid "Build and analyze a Docker image from a Dockerfile"
msgstr ""
msgid "Build and install a new package"
msgstr "Build and install a new package"
@@ -12233,9 +12230,6 @@ msgstr ""
msgid "Config and front matter format"
msgstr ""
msgid "Config file"
msgstr ""
msgid "Config file (default: $HOME/.s3cfg)"
msgstr ""
@@ -30341,9 +30335,6 @@ msgstr ""
msgid "Help for convert"
msgstr ""
msgid "Help for dive"
msgstr ""
msgid "Help for doc"
msgstr ""
@@ -30503,12 +30494,6 @@ msgstr ""
msgid "Higher-order task to perform other tasks in succession."
msgstr ""
msgid "Highest allowable bytes wasted"
msgstr ""
msgid "Highest allowable percentage of bytes wasted"
msgstr ""
msgid "Highest compression, same as -12"
msgstr ""
@@ -30860,9 +30845,6 @@ msgstr "Identity types to display"
msgid "Idiomatically format Dart source code"
msgstr ""
msgid "If CI=true in the environment, use the given yaml to drive validation rules"
msgstr ""
msgid "If HTTP proxy is used, make curl tunnel through it"
msgstr ""
@@ -31163,9 +31145,6 @@ msgstr ""
msgid "Ignore host and package architecture mismatch"
msgstr ""
msgid "Ignore image parsing errors and run the analysis anyway"
msgstr ""
msgid "Ignore inhibitor locks on shutdown or sleep"
msgstr ""
@@ -37094,9 +37073,6 @@ msgstr ""
msgid "Lower the volume by 8%"
msgstr ""
msgid "Lowest allowable image efficiency"
msgstr ""
msgid "MAC address"
msgstr ""
@@ -61313,12 +61289,6 @@ msgstr ""
msgid "Skip the given initial samples for each input {#|mm:ss.ss}"
msgstr ""
msgid "Skip the interactive TUI and validate against CI rules"
msgstr ""
msgid "Skip the interactive TUI and write the layer analysis statistics to a given file"
msgstr ""
msgid "Skip the normal function prologue and epilogue that sets up the stack-frame"
msgstr ""
@@ -66443,9 +66413,6 @@ msgstr ""
msgid "The connection protocol to use"
msgstr ""
msgid "The container engine to fetch the image from"
msgstr ""
msgid "The copy job is not persisted if VM is turned off"
msgstr ""
@@ -74381,6 +74348,9 @@ msgstr ""
msgid "configure the Salesforce CLI"
msgstr ""
msgid "connect adb to the Android container"
msgstr ""
msgid "connect to a custom bus"
msgstr ""
@@ -74471,6 +74441,9 @@ msgstr ""
msgid "create a backup of one or several jails"
msgstr ""
msgid "create a bugreport archive interactively"
msgstr ""
msgid "create a bundle for an Aura component or a Lightning web component"
msgstr ""
@@ -74819,6 +74792,9 @@ msgstr ""
msgid "discard uncommitted changes (no backup)"
msgstr ""
msgid "disconnect adb from the Android container"
msgstr ""
msgid "disconnect and wait for reassociate command before connecting"
msgstr ""
@@ -77057,6 +77033,9 @@ msgstr ""
msgid "make vendored copy of dependencies"
msgstr ""
msgid "manage adb connection"
msgstr ""
msgid "manage and query devices in the filesystem"
msgstr ""
@@ -78875,6 +78854,9 @@ msgstr ""
msgid "run as if started in dir"
msgstr ""
msgid "run as user mode, connecting to the remote initializer service"
msgstr ""
msgid "run command"
msgstr ""

View File

@@ -9374,9 +9374,6 @@ msgstr ""
msgid "Build an RPM package"
msgstr ""
msgid "Build and analyze a Docker image from a Dockerfile"
msgstr ""
msgid "Build and install a new package"
msgstr ""
@@ -12233,9 +12230,6 @@ msgstr ""
msgid "Config and front matter format"
msgstr ""
msgid "Config file"
msgstr ""
msgid "Config file (default: $HOME/.s3cfg)"
msgstr ""
@@ -30341,9 +30335,6 @@ msgstr ""
msgid "Help for convert"
msgstr ""
msgid "Help for dive"
msgstr ""
msgid "Help for doc"
msgstr ""
@@ -30503,12 +30494,6 @@ msgstr ""
msgid "Higher-order task to perform other tasks in succession."
msgstr ""
msgid "Highest allowable bytes wasted"
msgstr ""
msgid "Highest allowable percentage of bytes wasted"
msgstr ""
msgid "Highest compression, same as -12"
msgstr ""
@@ -30860,9 +30845,6 @@ msgstr ""
msgid "Idiomatically format Dart source code"
msgstr ""
msgid "If CI=true in the environment, use the given yaml to drive validation rules"
msgstr ""
msgid "If HTTP proxy is used, make curl tunnel through it"
msgstr ""
@@ -31163,9 +31145,6 @@ msgstr ""
msgid "Ignore host and package architecture mismatch"
msgstr ""
msgid "Ignore image parsing errors and run the analysis anyway"
msgstr ""
msgid "Ignore inhibitor locks on shutdown or sleep"
msgstr ""
@@ -37094,9 +37073,6 @@ msgstr ""
msgid "Lower the volume by 8%"
msgstr ""
msgid "Lowest allowable image efficiency"
msgstr ""
msgid "MAC address"
msgstr ""
@@ -61313,12 +61289,6 @@ msgstr ""
msgid "Skip the given initial samples for each input {#|mm:ss.ss}"
msgstr ""
msgid "Skip the interactive TUI and validate against CI rules"
msgstr ""
msgid "Skip the interactive TUI and write the layer analysis statistics to a given file"
msgstr ""
msgid "Skip the normal function prologue and epilogue that sets up the stack-frame"
msgstr ""
@@ -66443,9 +66413,6 @@ msgstr ""
msgid "The connection protocol to use"
msgstr ""
msgid "The container engine to fetch the image from"
msgstr ""
msgid "The copy job is not persisted if VM is turned off"
msgstr ""
@@ -74381,6 +74348,9 @@ msgstr ""
msgid "configure the Salesforce CLI"
msgstr ""
msgid "connect adb to the Android container"
msgstr ""
msgid "connect to a custom bus"
msgstr ""
@@ -74471,6 +74441,9 @@ msgstr ""
msgid "create a backup of one or several jails"
msgstr ""
msgid "create a bugreport archive interactively"
msgstr ""
msgid "create a bundle for an Aura component or a Lightning web component"
msgstr ""
@@ -74819,6 +74792,9 @@ msgstr ""
msgid "discard uncommitted changes (no backup)"
msgstr ""
msgid "disconnect adb from the Android container"
msgstr ""
msgid "disconnect and wait for reassociate command before connecting"
msgstr ""
@@ -77057,6 +77033,9 @@ msgstr ""
msgid "make vendored copy of dependencies"
msgstr ""
msgid "manage adb connection"
msgstr ""
msgid "manage and query devices in the filesystem"
msgstr ""
@@ -78875,6 +78854,9 @@ msgstr ""
msgid "run as if started in dir"
msgstr ""
msgid "run as user mode, connecting to the remote initializer service"
msgstr ""
msgid "run command"
msgstr ""

View File

@@ -9503,9 +9503,6 @@ msgstr ""
msgid "Build an RPM package"
msgstr ""
msgid "Build and analyze a Docker image from a Dockerfile"
msgstr ""
msgid "Build and install a new package"
msgstr "Construire et installer un nouveau paquet"
@@ -12362,9 +12359,6 @@ msgstr "Ficher de configuration"
msgid "Config and front matter format"
msgstr "Configuration et format du frontal"
msgid "Config file"
msgstr ""
msgid "Config file (default: $HOME/.s3cfg)"
msgstr ""
@@ -30470,9 +30464,6 @@ msgstr "Aide sur « config »"
msgid "Help for convert"
msgstr "Aide sur « convert »"
msgid "Help for dive"
msgstr ""
msgid "Help for doc"
msgstr "Aide sur « doc »"
@@ -30632,12 +30623,6 @@ msgstr ""
msgid "Higher-order task to perform other tasks in succession."
msgstr ""
msgid "Highest allowable bytes wasted"
msgstr ""
msgid "Highest allowable percentage of bytes wasted"
msgstr ""
msgid "Highest compression, same as -12"
msgstr ""
@@ -30989,9 +30974,6 @@ msgstr "Types didentité à afficher"
msgid "Idiomatically format Dart source code"
msgstr ""
msgid "If CI=true in the environment, use the given yaml to drive validation rules"
msgstr ""
msgid "If HTTP proxy is used, make curl tunnel through it"
msgstr ""
@@ -31292,9 +31274,6 @@ msgstr ""
msgid "Ignore host and package architecture mismatch"
msgstr ""
msgid "Ignore image parsing errors and run the analysis anyway"
msgstr ""
msgid "Ignore inhibitor locks on shutdown or sleep"
msgstr "Ignorer les verrous dinhibition lors de larrêt ou de la mise en veille"
@@ -37223,9 +37202,6 @@ msgstr ""
msgid "Lower the volume by 8%"
msgstr ""
msgid "Lowest allowable image efficiency"
msgstr ""
msgid "MAC address"
msgstr ""
@@ -61442,12 +61418,6 @@ msgstr ""
msgid "Skip the given initial samples for each input {#|mm:ss.ss}"
msgstr "Partir de léchantillon spécifié pour chaque fichier en entrée (#|mm:ss.ss)"
msgid "Skip the interactive TUI and validate against CI rules"
msgstr ""
msgid "Skip the interactive TUI and write the layer analysis statistics to a given file"
msgstr ""
msgid "Skip the normal function prologue and epilogue that sets up the stack-frame"
msgstr ""
@@ -66572,9 +66542,6 @@ msgstr "Le fichier de configuration à utiliser pour lutilisation"
msgid "The connection protocol to use"
msgstr ""
msgid "The container engine to fetch the image from"
msgstr ""
msgid "The copy job is not persisted if VM is turned off"
msgstr ""
@@ -74510,6 +74477,9 @@ msgstr ""
msgid "configure the Salesforce CLI"
msgstr ""
msgid "connect adb to the Android container"
msgstr ""
msgid "connect to a custom bus"
msgstr ""
@@ -74600,6 +74570,9 @@ msgstr ""
msgid "create a backup of one or several jails"
msgstr "Créer une sauvegarde dun ou plusieurs environnements jail"
msgid "create a bugreport archive interactively"
msgstr ""
msgid "create a bundle for an Aura component or a Lightning web component"
msgstr ""
@@ -74948,6 +74921,9 @@ msgstr ""
msgid "discard uncommitted changes (no backup)"
msgstr "Ignorer les modifications non validées (pas de sauvegarde)"
msgid "disconnect adb from the Android container"
msgstr ""
msgid "disconnect and wait for reassociate command before connecting"
msgstr ""
@@ -77186,6 +77162,9 @@ msgstr "Rendre locale létiquette"
msgid "make vendored copy of dependencies"
msgstr ""
msgid "manage adb connection"
msgstr ""
msgid "manage and query devices in the filesystem"
msgstr ""
@@ -79004,6 +78983,9 @@ msgstr ""
msgid "run as if started in dir"
msgstr ""
msgid "run as user mode, connecting to the remote initializer service"
msgstr ""
msgid "run command"
msgstr ""

View File

@@ -9377,9 +9377,6 @@ msgstr ""
msgid "Build an RPM package"
msgstr ""
msgid "Build and analyze a Docker image from a Dockerfile"
msgstr ""
msgid "Build and install a new package"
msgstr ""
@@ -12236,9 +12233,6 @@ msgstr ""
msgid "Config and front matter format"
msgstr ""
msgid "Config file"
msgstr ""
msgid "Config file (default: $HOME/.s3cfg)"
msgstr ""
@@ -30344,9 +30338,6 @@ msgstr ""
msgid "Help for convert"
msgstr ""
msgid "Help for dive"
msgstr ""
msgid "Help for doc"
msgstr ""
@@ -30506,12 +30497,6 @@ msgstr ""
msgid "Higher-order task to perform other tasks in succession."
msgstr ""
msgid "Highest allowable bytes wasted"
msgstr ""
msgid "Highest allowable percentage of bytes wasted"
msgstr ""
msgid "Highest compression, same as -12"
msgstr ""
@@ -30863,9 +30848,6 @@ msgstr ""
msgid "Idiomatically format Dart source code"
msgstr ""
msgid "If CI=true in the environment, use the given yaml to drive validation rules"
msgstr ""
msgid "If HTTP proxy is used, make curl tunnel through it"
msgstr ""
@@ -31166,9 +31148,6 @@ msgstr ""
msgid "Ignore host and package architecture mismatch"
msgstr ""
msgid "Ignore image parsing errors and run the analysis anyway"
msgstr ""
msgid "Ignore inhibitor locks on shutdown or sleep"
msgstr ""
@@ -37097,9 +37076,6 @@ msgstr ""
msgid "Lower the volume by 8%"
msgstr ""
msgid "Lowest allowable image efficiency"
msgstr ""
msgid "MAC address"
msgstr ""
@@ -61316,12 +61292,6 @@ msgstr ""
msgid "Skip the given initial samples for each input {#|mm:ss.ss}"
msgstr ""
msgid "Skip the interactive TUI and validate against CI rules"
msgstr ""
msgid "Skip the interactive TUI and write the layer analysis statistics to a given file"
msgstr ""
msgid "Skip the normal function prologue and epilogue that sets up the stack-frame"
msgstr ""
@@ -66446,9 +66416,6 @@ msgstr ""
msgid "The connection protocol to use"
msgstr ""
msgid "The container engine to fetch the image from"
msgstr ""
msgid "The copy job is not persisted if VM is turned off"
msgstr ""
@@ -74384,6 +74351,9 @@ msgstr ""
msgid "configure the Salesforce CLI"
msgstr ""
msgid "connect adb to the Android container"
msgstr ""
msgid "connect to a custom bus"
msgstr ""
@@ -74474,6 +74444,9 @@ msgstr ""
msgid "create a backup of one or several jails"
msgstr ""
msgid "create a bugreport archive interactively"
msgstr ""
msgid "create a bundle for an Aura component or a Lightning web component"
msgstr ""
@@ -74822,6 +74795,9 @@ msgstr ""
msgid "discard uncommitted changes (no backup)"
msgstr ""
msgid "disconnect adb from the Android container"
msgstr ""
msgid "disconnect and wait for reassociate command before connecting"
msgstr ""
@@ -77060,6 +77036,9 @@ msgstr ""
msgid "make vendored copy of dependencies"
msgstr ""
msgid "manage adb connection"
msgstr ""
msgid "manage and query devices in the filesystem"
msgstr ""
@@ -78878,6 +78857,9 @@ msgstr ""
msgid "run as if started in dir"
msgstr ""
msgid "run as user mode, connecting to the remote initializer service"
msgstr ""
msgid "run command"
msgstr ""

View File

@@ -9370,9 +9370,6 @@ msgstr ""
msgid "Build an RPM package"
msgstr ""
msgid "Build and analyze a Docker image from a Dockerfile"
msgstr ""
msgid "Build and install a new package"
msgstr ""
@@ -12229,9 +12226,6 @@ msgstr ""
msgid "Config and front matter format"
msgstr ""
msgid "Config file"
msgstr ""
msgid "Config file (default: $HOME/.s3cfg)"
msgstr ""
@@ -30337,9 +30331,6 @@ msgstr ""
msgid "Help for convert"
msgstr ""
msgid "Help for dive"
msgstr ""
msgid "Help for doc"
msgstr ""
@@ -30499,12 +30490,6 @@ msgstr ""
msgid "Higher-order task to perform other tasks in succession."
msgstr ""
msgid "Highest allowable bytes wasted"
msgstr ""
msgid "Highest allowable percentage of bytes wasted"
msgstr ""
msgid "Highest compression, same as -12"
msgstr ""
@@ -30856,9 +30841,6 @@ msgstr ""
msgid "Idiomatically format Dart source code"
msgstr ""
msgid "If CI=true in the environment, use the given yaml to drive validation rules"
msgstr ""
msgid "If HTTP proxy is used, make curl tunnel through it"
msgstr ""
@@ -31159,9 +31141,6 @@ msgstr ""
msgid "Ignore host and package architecture mismatch"
msgstr ""
msgid "Ignore image parsing errors and run the analysis anyway"
msgstr ""
msgid "Ignore inhibitor locks on shutdown or sleep"
msgstr ""
@@ -37090,9 +37069,6 @@ msgstr ""
msgid "Lower the volume by 8%"
msgstr ""
msgid "Lowest allowable image efficiency"
msgstr ""
msgid "MAC address"
msgstr ""
@@ -61309,12 +61285,6 @@ msgstr ""
msgid "Skip the given initial samples for each input {#|mm:ss.ss}"
msgstr ""
msgid "Skip the interactive TUI and validate against CI rules"
msgstr ""
msgid "Skip the interactive TUI and write the layer analysis statistics to a given file"
msgstr ""
msgid "Skip the normal function prologue and epilogue that sets up the stack-frame"
msgstr ""
@@ -66439,9 +66409,6 @@ msgstr ""
msgid "The connection protocol to use"
msgstr ""
msgid "The container engine to fetch the image from"
msgstr ""
msgid "The copy job is not persisted if VM is turned off"
msgstr ""
@@ -74377,6 +74344,9 @@ msgstr ""
msgid "configure the Salesforce CLI"
msgstr ""
msgid "connect adb to the Android container"
msgstr ""
msgid "connect to a custom bus"
msgstr ""
@@ -74467,6 +74437,9 @@ msgstr ""
msgid "create a backup of one or several jails"
msgstr ""
msgid "create a bugreport archive interactively"
msgstr ""
msgid "create a bundle for an Aura component or a Lightning web component"
msgstr ""
@@ -74815,6 +74788,9 @@ msgstr ""
msgid "discard uncommitted changes (no backup)"
msgstr ""
msgid "disconnect adb from the Android container"
msgstr ""
msgid "disconnect and wait for reassociate command before connecting"
msgstr ""
@@ -77053,6 +77029,9 @@ msgstr ""
msgid "make vendored copy of dependencies"
msgstr ""
msgid "manage adb connection"
msgstr ""
msgid "manage and query devices in the filesystem"
msgstr ""
@@ -78871,6 +78850,9 @@ msgstr ""
msgid "run as if started in dir"
msgstr ""
msgid "run as user mode, connecting to the remote initializer service"
msgstr ""
msgid "run command"
msgstr ""

View File

@@ -9375,9 +9375,6 @@ msgstr ""
msgid "Build an RPM package"
msgstr ""
msgid "Build and analyze a Docker image from a Dockerfile"
msgstr ""
msgid "Build and install a new package"
msgstr ""
@@ -12234,9 +12231,6 @@ msgstr ""
msgid "Config and front matter format"
msgstr ""
msgid "Config file"
msgstr ""
msgid "Config file (default: $HOME/.s3cfg)"
msgstr ""
@@ -30342,9 +30336,6 @@ msgstr ""
msgid "Help for convert"
msgstr ""
msgid "Help for dive"
msgstr ""
msgid "Help for doc"
msgstr ""
@@ -30504,12 +30495,6 @@ msgstr ""
msgid "Higher-order task to perform other tasks in succession."
msgstr ""
msgid "Highest allowable bytes wasted"
msgstr ""
msgid "Highest allowable percentage of bytes wasted"
msgstr ""
msgid "Highest compression, same as -12"
msgstr ""
@@ -30861,9 +30846,6 @@ msgstr ""
msgid "Idiomatically format Dart source code"
msgstr ""
msgid "If CI=true in the environment, use the given yaml to drive validation rules"
msgstr ""
msgid "If HTTP proxy is used, make curl tunnel through it"
msgstr ""
@@ -31164,9 +31146,6 @@ msgstr ""
msgid "Ignore host and package architecture mismatch"
msgstr ""
msgid "Ignore image parsing errors and run the analysis anyway"
msgstr ""
msgid "Ignore inhibitor locks on shutdown or sleep"
msgstr ""
@@ -37095,9 +37074,6 @@ msgstr ""
msgid "Lower the volume by 8%"
msgstr ""
msgid "Lowest allowable image efficiency"
msgstr ""
msgid "MAC address"
msgstr ""
@@ -61314,12 +61290,6 @@ msgstr ""
msgid "Skip the given initial samples for each input {#|mm:ss.ss}"
msgstr ""
msgid "Skip the interactive TUI and validate against CI rules"
msgstr ""
msgid "Skip the interactive TUI and write the layer analysis statistics to a given file"
msgstr ""
msgid "Skip the normal function prologue and epilogue that sets up the stack-frame"
msgstr ""
@@ -66444,9 +66414,6 @@ msgstr ""
msgid "The connection protocol to use"
msgstr ""
msgid "The container engine to fetch the image from"
msgstr ""
msgid "The copy job is not persisted if VM is turned off"
msgstr ""
@@ -74382,6 +74349,9 @@ msgstr ""
msgid "configure the Salesforce CLI"
msgstr ""
msgid "connect adb to the Android container"
msgstr ""
msgid "connect to a custom bus"
msgstr ""
@@ -74472,6 +74442,9 @@ msgstr ""
msgid "create a backup of one or several jails"
msgstr ""
msgid "create a bugreport archive interactively"
msgstr ""
msgid "create a bundle for an Aura component or a Lightning web component"
msgstr ""
@@ -74820,6 +74793,9 @@ msgstr ""
msgid "discard uncommitted changes (no backup)"
msgstr ""
msgid "disconnect adb from the Android container"
msgstr ""
msgid "disconnect and wait for reassociate command before connecting"
msgstr ""
@@ -77058,6 +77034,9 @@ msgstr ""
msgid "make vendored copy of dependencies"
msgstr ""
msgid "manage adb connection"
msgstr ""
msgid "manage and query devices in the filesystem"
msgstr ""
@@ -78876,6 +78855,9 @@ msgstr ""
msgid "run as if started in dir"
msgstr ""
msgid "run as user mode, connecting to the remote initializer service"
msgstr ""
msgid "run command"
msgstr ""

View File

@@ -9371,9 +9371,6 @@ msgstr ""
msgid "Build an RPM package"
msgstr ""
msgid "Build and analyze a Docker image from a Dockerfile"
msgstr ""
msgid "Build and install a new package"
msgstr "Bygg och installera nytt paket"
@@ -12230,9 +12227,6 @@ msgstr ""
msgid "Config and front matter format"
msgstr ""
msgid "Config file"
msgstr ""
msgid "Config file (default: $HOME/.s3cfg)"
msgstr ""
@@ -30338,9 +30332,6 @@ msgstr ""
msgid "Help for convert"
msgstr ""
msgid "Help for dive"
msgstr ""
msgid "Help for doc"
msgstr ""
@@ -30500,12 +30491,6 @@ msgstr ""
msgid "Higher-order task to perform other tasks in succession."
msgstr ""
msgid "Highest allowable bytes wasted"
msgstr ""
msgid "Highest allowable percentage of bytes wasted"
msgstr ""
msgid "Highest compression, same as -12"
msgstr ""
@@ -30857,9 +30842,6 @@ msgstr ""
msgid "Idiomatically format Dart source code"
msgstr ""
msgid "If CI=true in the environment, use the given yaml to drive validation rules"
msgstr ""
msgid "If HTTP proxy is used, make curl tunnel through it"
msgstr ""
@@ -31160,9 +31142,6 @@ msgstr ""
msgid "Ignore host and package architecture mismatch"
msgstr ""
msgid "Ignore image parsing errors and run the analysis anyway"
msgstr ""
msgid "Ignore inhibitor locks on shutdown or sleep"
msgstr ""
@@ -37091,9 +37070,6 @@ msgstr ""
msgid "Lower the volume by 8%"
msgstr ""
msgid "Lowest allowable image efficiency"
msgstr ""
msgid "MAC address"
msgstr ""
@@ -61310,12 +61286,6 @@ msgstr ""
msgid "Skip the given initial samples for each input {#|mm:ss.ss}"
msgstr ""
msgid "Skip the interactive TUI and validate against CI rules"
msgstr ""
msgid "Skip the interactive TUI and write the layer analysis statistics to a given file"
msgstr ""
msgid "Skip the normal function prologue and epilogue that sets up the stack-frame"
msgstr ""
@@ -66440,9 +66410,6 @@ msgstr ""
msgid "The connection protocol to use"
msgstr ""
msgid "The container engine to fetch the image from"
msgstr ""
msgid "The copy job is not persisted if VM is turned off"
msgstr ""
@@ -74378,6 +74345,9 @@ msgstr ""
msgid "configure the Salesforce CLI"
msgstr ""
msgid "connect adb to the Android container"
msgstr ""
msgid "connect to a custom bus"
msgstr ""
@@ -74468,6 +74438,9 @@ msgstr ""
msgid "create a backup of one or several jails"
msgstr ""
msgid "create a bugreport archive interactively"
msgstr ""
msgid "create a bundle for an Aura component or a Lightning web component"
msgstr ""
@@ -74816,6 +74789,9 @@ msgstr ""
msgid "discard uncommitted changes (no backup)"
msgstr ""
msgid "disconnect adb from the Android container"
msgstr ""
msgid "disconnect and wait for reassociate command before connecting"
msgstr ""
@@ -77054,6 +77030,9 @@ msgstr ""
msgid "make vendored copy of dependencies"
msgstr ""
msgid "manage adb connection"
msgstr ""
msgid "manage and query devices in the filesystem"
msgstr ""
@@ -78872,6 +78851,9 @@ msgstr ""
msgid "run as if started in dir"
msgstr ""
msgid "run as user mode, connecting to the remote initializer service"
msgstr ""
msgid "run command"
msgstr ""

View File

@@ -9395,9 +9395,6 @@ msgstr ""
msgid "Build an RPM package"
msgstr ""
msgid "Build and analyze a Docker image from a Dockerfile"
msgstr ""
msgid "Build and install a new package"
msgstr ""
@@ -12254,9 +12251,6 @@ msgstr ""
msgid "Config and front matter format"
msgstr ""
msgid "Config file"
msgstr ""
msgid "Config file (default: $HOME/.s3cfg)"
msgstr ""
@@ -30362,9 +30356,6 @@ msgstr ""
msgid "Help for convert"
msgstr ""
msgid "Help for dive"
msgstr ""
msgid "Help for doc"
msgstr ""
@@ -30524,12 +30515,6 @@ msgstr ""
msgid "Higher-order task to perform other tasks in succession."
msgstr ""
msgid "Highest allowable bytes wasted"
msgstr ""
msgid "Highest allowable percentage of bytes wasted"
msgstr ""
msgid "Highest compression, same as -12"
msgstr ""
@@ -30881,9 +30866,6 @@ msgstr ""
msgid "Idiomatically format Dart source code"
msgstr ""
msgid "If CI=true in the environment, use the given yaml to drive validation rules"
msgstr ""
msgid "If HTTP proxy is used, make curl tunnel through it"
msgstr ""
@@ -31184,9 +31166,6 @@ msgstr ""
msgid "Ignore host and package architecture mismatch"
msgstr ""
msgid "Ignore image parsing errors and run the analysis anyway"
msgstr ""
msgid "Ignore inhibitor locks on shutdown or sleep"
msgstr ""
@@ -37115,9 +37094,6 @@ msgstr ""
msgid "Lower the volume by 8%"
msgstr ""
msgid "Lowest allowable image efficiency"
msgstr ""
msgid "MAC address"
msgstr ""
@@ -61334,12 +61310,6 @@ msgstr ""
msgid "Skip the given initial samples for each input {#|mm:ss.ss}"
msgstr ""
msgid "Skip the interactive TUI and validate against CI rules"
msgstr ""
msgid "Skip the interactive TUI and write the layer analysis statistics to a given file"
msgstr ""
msgid "Skip the normal function prologue and epilogue that sets up the stack-frame"
msgstr ""
@@ -66464,9 +66434,6 @@ msgstr ""
msgid "The connection protocol to use"
msgstr ""
msgid "The container engine to fetch the image from"
msgstr ""
msgid "The copy job is not persisted if VM is turned off"
msgstr ""
@@ -74402,6 +74369,9 @@ msgstr ""
msgid "configure the Salesforce CLI"
msgstr ""
msgid "connect adb to the Android container"
msgstr ""
msgid "connect to a custom bus"
msgstr ""
@@ -74492,6 +74462,9 @@ msgstr ""
msgid "create a backup of one or several jails"
msgstr ""
msgid "create a bugreport archive interactively"
msgstr ""
msgid "create a bundle for an Aura component or a Lightning web component"
msgstr ""
@@ -74840,6 +74813,9 @@ msgstr ""
msgid "discard uncommitted changes (no backup)"
msgstr ""
msgid "disconnect adb from the Android container"
msgstr ""
msgid "disconnect and wait for reassociate command before connecting"
msgstr ""
@@ -77078,6 +77054,9 @@ msgstr ""
msgid "make vendored copy of dependencies"
msgstr ""
msgid "manage adb connection"
msgstr ""
msgid "manage and query devices in the filesystem"
msgstr ""
@@ -78896,6 +78875,9 @@ msgstr ""
msgid "run as if started in dir"
msgstr ""
msgid "run as user mode, connecting to the remote initializer service"
msgstr ""
msgid "run command"
msgstr ""

View File

@@ -9372,9 +9372,6 @@ msgstr ""
msgid "Build an RPM package"
msgstr ""
msgid "Build and analyze a Docker image from a Dockerfile"
msgstr ""
msgid "Build and install a new package"
msgstr ""
@@ -12231,9 +12228,6 @@ msgstr ""
msgid "Config and front matter format"
msgstr ""
msgid "Config file"
msgstr ""
msgid "Config file (default: $HOME/.s3cfg)"
msgstr ""
@@ -30339,9 +30333,6 @@ msgstr ""
msgid "Help for convert"
msgstr ""
msgid "Help for dive"
msgstr ""
msgid "Help for doc"
msgstr ""
@@ -30501,12 +30492,6 @@ msgstr ""
msgid "Higher-order task to perform other tasks in succession."
msgstr ""
msgid "Highest allowable bytes wasted"
msgstr ""
msgid "Highest allowable percentage of bytes wasted"
msgstr ""
msgid "Highest compression, same as -12"
msgstr ""
@@ -30858,9 +30843,6 @@ msgstr ""
msgid "Idiomatically format Dart source code"
msgstr ""
msgid "If CI=true in the environment, use the given yaml to drive validation rules"
msgstr ""
msgid "If HTTP proxy is used, make curl tunnel through it"
msgstr ""
@@ -31161,9 +31143,6 @@ msgstr ""
msgid "Ignore host and package architecture mismatch"
msgstr ""
msgid "Ignore image parsing errors and run the analysis anyway"
msgstr ""
msgid "Ignore inhibitor locks on shutdown or sleep"
msgstr ""
@@ -37092,9 +37071,6 @@ msgstr ""
msgid "Lower the volume by 8%"
msgstr ""
msgid "Lowest allowable image efficiency"
msgstr ""
msgid "MAC address"
msgstr ""
@@ -61311,12 +61287,6 @@ msgstr ""
msgid "Skip the given initial samples for each input {#|mm:ss.ss}"
msgstr ""
msgid "Skip the interactive TUI and validate against CI rules"
msgstr ""
msgid "Skip the interactive TUI and write the layer analysis statistics to a given file"
msgstr ""
msgid "Skip the normal function prologue and epilogue that sets up the stack-frame"
msgstr ""
@@ -66441,9 +66411,6 @@ msgstr ""
msgid "The connection protocol to use"
msgstr ""
msgid "The container engine to fetch the image from"
msgstr ""
msgid "The copy job is not persisted if VM is turned off"
msgstr ""
@@ -74379,6 +74346,9 @@ msgstr ""
msgid "configure the Salesforce CLI"
msgstr ""
msgid "connect adb to the Android container"
msgstr ""
msgid "connect to a custom bus"
msgstr ""
@@ -74469,6 +74439,9 @@ msgstr ""
msgid "create a backup of one or several jails"
msgstr ""
msgid "create a bugreport archive interactively"
msgstr ""
msgid "create a bundle for an Aura component or a Lightning web component"
msgstr ""
@@ -74817,6 +74790,9 @@ msgstr ""
msgid "discard uncommitted changes (no backup)"
msgstr ""
msgid "disconnect adb from the Android container"
msgstr ""
msgid "disconnect and wait for reassociate command before connecting"
msgstr ""
@@ -77055,6 +77031,9 @@ msgstr ""
msgid "make vendored copy of dependencies"
msgstr ""
msgid "manage adb connection"
msgstr ""
msgid "manage and query devices in the filesystem"
msgstr ""
@@ -78873,6 +78852,9 @@ msgstr ""
msgid "run as if started in dir"
msgstr ""
msgid "run as user mode, connecting to the remote initializer service"
msgstr ""
msgid "run command"
msgstr ""

View File

@@ -0,0 +1 @@
chezmoi completion fish | source

View File

@@ -1,24 +1,22 @@
# Completion for dive: https://github.com/wagoodman/dive
# Options
complete -c dive -l ci -d "Skip the interactive TUI and validate against CI rules"
complete -c dive -l ci-config -F -r -d "If CI=true in the environment, use the given yaml to drive validation rules"
complete -c dive -l config -F -r -d "Config file"
complete -c dive -s h -l help -d "Help for dive"
complete -c dive -l highestUserWastedPercent -r -n "__fish_seen_argument -l ci" -d "Highest allowable percentage of bytes wasted"
complete -c dive -l highestWastedBytes -r -n "__fish_seen_argument -l ci" -d "Highest allowable bytes wasted"
complete -c dive -s i -l ignore-errors -d "Ignore image parsing errors and run the analysis anyway"
complete -c dive -s j -l json -r -d "Skip the interactive TUI and write the layer analysis statistics to a given file"
complete -c dive -l lowestEfficiency -r -d "Lowest allowable image efficiency"
complete -c dive -l source -a "docker podman docker-archive" -d "The container engine to fetch the image from"
complete -c dive -s v -l version -d "Display version number"
# Subcommands
complete -c dive -a "build help version"
complete -c dive -n __fish_use_subcommand -xa build -d "Build and analyze a Docker image from a Dockerfile"
complete -c dive -n __fish_use_subcommand -xa help -d "Help about any command"
complete -c dive -n __fish_use_subcommand -xa version -d "Print the version number and exit"
complete -c dive -n "__fish_seen_subcommand_from help" -a "build help version"
# Builtin options and subcommands
dive completion fish | source
# Arguments
complete -c dive -xa "(docker images --format '{{.Repository}}:{{.Tag}}' | command grep -v '<none>')"
function __fish_docker_or_podman_image_tags
command -v docker >/dev/null
set --local docker_status $status
command -v podman >/dev/null
set --local podman_status $status
if test $docker_status -eq 0 && test $podman_status -eq 0
docker images --format '{{.Repository}}:{{.Tag}}' 2>/dev/null | command grep -v '<none>' | sed 's#^#docker://#'
podman images --format '{{.Repository}}:{{.Tag}}' 2>/dev/null | command grep -v '<none>' | sed 's#^#podman://#'
else if test $docker_status -eq 0
docker images --format '{{.Repository}}:{{.Tag}}' 2>/dev/null | command grep -v '<none>'
else if test $podman_status -eq 0
podman images --format '{{.Repository}}:{{.Tag}}' 2>/dev/null | command grep -v '<none>'
end
end
complete -c dive -xa "(__fish_docker_or_podman_image_tags)"

View File

@@ -1,5 +1,5 @@
#function __fish_emerge_print_all_pkgs_with_version_compare -d 'Print completions for all packages including the version compare if that is already typed'
# set -l version_comparator (commandline -t | string match -r '^[\'"]*[<>]\?=\?' | \
# set -l version_comparator (commandline -t | string match -r '^[\'"]*[<>]\?=\?' |
# sed -r 's/^[\'"]*(.*)/\1/g')
# set -l sedstring
#

View File

@@ -1,4 +1 @@
function _justfile_targets
just -l | tail -n +2 | string trim -l | string replace -r '(\s*#\s*)' '\t' | string replace -r '(\s*[\*\+][^\s]*)' ''
end
complete -c just -f -a '(_justfile_targets)'
just --completions fish | source

View File

@@ -0,0 +1 @@
mise completion fish | source

View File

@@ -0,0 +1 @@
niri completions fish | source

View File

@@ -1,5 +1,14 @@
function __fish_print_waydroid_container_package_name
set -l applist (waydroid app list 2>/dev/null | grep -E '^(Name: |packageName: )')
set -l name (string replace -f -r '^Name: ' '' $applist)
set -l packagename (string replace -f 'packageName: ' '' $applist)
for i in (seq (count $name))
echo $packagename[$i]\t$name[$i]
end
end
#all subcommands avaliable
set -l commands status log init upgrade session container app prop show-full-ui first-launch shell logcat
set -l commands status log init upgrade session container app prop show-full-ui first-launch shell logcat adb bugreport
#help parameter can be used on any (sub)commands
complete -f waydroid -s h -l help -d "show help message and exit"
@@ -28,6 +37,8 @@ complete -f waydroid -n "not __fish_seen_subcommand_from $commands" -a show-full
complete -f waydroid -n "not __fish_seen_subcommand_from $commands" -a first-launch -d "initialize waydroid and start it"
complete -f waydroid -n "not __fish_seen_subcommand_from $commands" -a shell -d "run remote shell command"
complete -f waydroid -n "not __fish_seen_subcommand_from $commands" -a logcat -d "show android logcat"
complete -f waydroid -n "not __fish_seen_subcommand_from $commands" -a adb -d "manage adb connection"
complete -f waydroid -n "not __fish_seen_subcommand_from $commands" -a bugreport -d "create a bugreport archive interactively"
#log
complete -f waydroid -n "__fish_seen_subcommand_from log" -s n -l lines -d "count of initial output lines"
@@ -38,8 +49,9 @@ complete -F waydroid -n "__fish_seen_subcommand_from init" -s i -l images_path -
complete -f waydroid -n "__fish_seen_subcommand_from init" -s f -l force -d "re-initialize configs and images"
complete -f waydroid -n "__fish_seen_subcommand_from init" -s c -l system_channel -d "custom system channel"
complete -f waydroid -n "__fish_seen_subcommand_from init" -s v -l vendor_channel -d "custom vendor channel"
complete -f waydroid -n "__fish_seen_subcommand_from init" -s r -l rom_type -ra "lineage bliss" -d "rom type"
complete -f waydroid -n "__fish_seen_subcommand_from init" -s s -l system_type -ra "VANILLA FOSS GAPPS" -d "system type"
complete -x waydroid -n "__fish_seen_subcommand_from init" -s r -l rom_type -a "lineage bliss" -d "rom type"
complete -x waydroid -n "__fish_seen_subcommand_from init" -s s -l system_type -a "VANILLA FOSS GAPPS" -d "system type"
complete -f waydroid -n "__fish_seen_subcommand_from init" -l client -d "run as user mode, connecting to the remote initializer service"
#upgrade
complete -f waydroid -n "__fish_seen_subcommand_from upgrade" -s o -l offline -d "just for updating configs"
@@ -56,13 +68,16 @@ complete -f waydroid -n "__fish_seen_subcommand_from container; and not __fish_s
complete -f waydroid -n "__fish_seen_subcommand_from container; and not __fish_seen_subcommand_from start stop restart freeze unfreeze" -a unfreeze -d "unfreeze container"
#app
complete -f waydroid -n "__fish_seen_subcommand_from app; and not __fish_seen_subcommand_from install remove launch intent list" -a install -r -d "push a single package to the container and install it"
complete -x waydroid -n "__fish_seen_subcommand_from app; and not __fish_seen_subcommand_from install remove launch intent list" -a install -d "push a single package to the container and install it"
complete -f waydroid -n "__fish_seen_subcommand_from app; and not __fish_seen_subcommand_from install remove launch intent list" -a remove -d "remove single app package from the container"
complete -f waydroid -n "__fish_seen_subcommand_from app; and not __fish_seen_subcommand_from install remove launch intent list" -a launch -d "start single application"
complete -f waydroid -n "__fish_seen_subcommand_from app; and not __fish_seen_subcommand_from install remove launch intent list" -a intent -d "start single application"
complete -f waydroid -n "__fish_seen_subcommand_from app; and not __fish_seen_subcommand_from install remove launch intent list" -a list -d "list installed applications"
#enable file completions on app install
complete -F waydroid -n "__fish_seen_subcommand_from app; and __fish_seen_subcommand_from install"
#package name completions for app launch and remove
complete -x waydroid -n "__fish_seen_subcommand_from app; and __fish_seen_subcommand_from launch" -a "(__fish_print_waydroid_container_package_name)"
complete -x waydroid -n "__fish_seen_subcommand_from app; and __fish_seen_subcommand_from remove" -a "(__fish_print_waydroid_container_package_name)"
#prop
complete -f waydroid -n "__fish_seen_subcommand_from prop; and not __fish_seen_subcommand_from get set" -a get -d "get value of property from container"
@@ -122,15 +137,20 @@ set -l prop_condition "__fish_seen_subcommand_from prop; and __fish_seen_subcomm
complete -f waydroid -n "$prop_condition" -a "true false"
#shell
complete -f waydroid -n "__fish_seen_subcommand_from shell" -s u -l uid -r -d "the UID to run as"
complete -f waydroid -n "__fish_seen_subcommand_from shell" -s g -l gid -r -d "the GID to run as"
complete -f waydroid -n "__fish_seen_subcommand_from shell" -s s -l context -r -d "transition to the specified SELinux or AppArmor security context"
complete -x waydroid -n "__fish_seen_subcommand_from shell" -s u -l uid -d "the UID to run as"
complete -x waydroid -n "__fish_seen_subcommand_from shell" -s g -l gid -d "the GID to run as"
complete -x waydroid -n "__fish_seen_subcommand_from shell" -s s -l context -d "transition to the specified SELinux or AppArmor security context"
complete -f waydroid -n "__fish_seen_subcommand_from shell" -s L -l nolsm -d "Don't perform security domain transition related to mandatory access control"
complete -f waydroid -n "__fish_seen_subcommand_from shell" -s C -l allcaps -d "Don't drop capabilities"
complete -f waydroid -n "__fish_seen_subcommand_from shell" -s G -l nocgroup -d "Don't switch to the container cgroup"
#adb
complete -f waydroid -n "__fish_seen_subcommand_from adb" -a connect -d "connect adb to the Android container"
complete -f waydroid -n "__fish_seen_subcommand_from adb" -a disconnect -d "disconnect adb from the Android container"
#below subcommands don't have any parameter or subcommand avaliable
#status
#show-full-ui
#first-launch
#logcat
#bugreport

View File

@@ -0,0 +1 @@
zellij setup --generate-completion fish | source

View File

@@ -2,28 +2,11 @@
# This file does some internal fish setup.
# It is not recommended to remove or edit it.
#
# Set default field separators
#
set -g IFS \n\ \t
set -qg __fish_added_user_paths
or set -g __fish_added_user_paths
#
# Create the default command_not_found handler
#
function __fish_default_command_not_found_handler
printf (_ "fish: Unknown command: %s\n") (string escape -- $argv[1]) >&2
end
if not status --is-interactive
# Hook up the default as the command_not_found handler
# if we are not interactive to avoid custom handlers.
function fish_command_not_found --on-event fish_command_not_found
__fish_default_command_not_found_handler $argv
end
end
#
# Set default search paths for completions and shellscript functions
# unless they already exist
@@ -148,7 +131,7 @@ and __fish_set_locale
# Some things should only be done for login terminals
# This used to be in etc/config.fish - keep it here to keep the semantics
#
if status --is-login
if status is-login
if command -sq /usr/libexec/path_helper
__fish_macos_set_env PATH /etc/paths '/etc/paths.d'
if test -n "$MANPATH"

View File

@@ -29,14 +29,14 @@ function __fish_config_interactive -d "Initializations that should be performed
# The default just prints a variable of the same name.
#
# NOTE: This status check is necessary to not print the greeting when `read`ing in scripts. See #7080.
if status --is-interactive
if not status is-interactive-read
and functions -q fish_greeting
fish_greeting
end
# Display SHELL_WELCOME if set. This is a standard environment variable (introduced by
# systemd v257) intended for shells to display when they first initialize.
if status --is-interactive
if not status is-interactive-read
and set -q SHELL_WELCOME[1]
string join -- ' ' $SHELL_WELCOME
end

View File

@@ -0,0 +1,4 @@
# localization: tier1
function __fish_default_command_not_found_handler
printf (_ "fish: Unknown command: %s\n") (string escape -- $argv[1]) >&2
end

View File

@@ -55,7 +55,7 @@ end" >$__fish_config_dir/config.fish
__fish_backup_config_files $relative_filename
mkdir -p -- (path dirname -- $filename)
echo >$filename "\
# This file was created by fish when upgrading to version 4.3, to migrate
# This file was created by fish when upgrading to version >= 4.3, to migrate
# the 'fish_key_bindings' variable from its old default scope (universal)
# to its new default scope (global). We recommend you delete this file
# and configure key bindings in ~/.config/fish/config.fish if needed.
@@ -83,9 +83,9 @@ set --erase --universal fish_key_bindings"
end
$mark_migration_done
if $removing_uvars
echo -s (set_color --bold) 'fish:' (set_color --reset) " upgraded to version 4.3:"
echo -s (set_color --bold) 'fish:' (set_color --reset) " upgraded to version >= 4.3.0:"
string join \n -- $msg
echo 'See also the release notes (type `help relnotes`).'
echo 'See also the release notes for 4.3.0 (type `help relnotes`).'
set -Ue fish_key_bindings $theme_uvars
set -l sh (__fish_posix_shell)
eval "$sh -c 'sleep 7 # Please read above notice about universal variables' </dev/null &>/dev/null &"
@@ -107,7 +107,7 @@ function __fish_config_theme_uvars_subset_of_historical_default
set -l matches __fish_config_theme_matches
$matches fish_color_keyword "$fish_color_command"
and $matches fish_color_option "$fish_color_param"
and $matches fish_color_autosuggestion brblack
and $matches fish_color_autosuggestion brblack "555 brblack"
and $matches fish_color_cancel -r
and $matches fish_color_command normal blue --reset
and $matches fish_color_comment red
@@ -125,19 +125,26 @@ function __fish_config_theme_uvars_subset_of_historical_default
and $matches fish_color_quote yellow
and $matches fish_color_redirection "cyan --bold"
and $matches fish_color_search_match \
"--background=111" \
"--background=brblack" \
"bryellow --background=brblack" \
"bryellow --background=brblack --bold" \
"white --background=brblack" \
"white --background=brblack --bold"
and $matches fish_color_selection "white --background=brblack --bold"
and $matches fish_color_selection \
"white --background=brblack --bold" \
"white --bold --background=brblack"
and $matches fish_color_status red
and $matches fish_color_user brgreen
and $matches fish_color_valid_path --underline
and $matches fish_color_background
and $matches fish_pager_color_background
and $matches fish_pager_color_completion
and $matches fish_pager_color_description "yellow -i" "yellow --italics"
and $matches fish_pager_color_prefix "normal --bold --underline" "--bold --underline"
and $matches fish_pager_color_description "B3A06D yellow -i" "yellow -i" "yellow --italics"
and $matches fish_pager_color_prefix \
"normal --bold --underline" \
"cyan --bold --underline" \
"--bold --underline"
and $matches fish_pager_color_progress \
"brwhite --background=cyan" \
"brwhite --background=cyan --bold"
@@ -149,6 +156,7 @@ function __fish_config_theme_uvars_subset_of_historical_default
and $matches fish_pager_color_selected_completion
and $matches fish_pager_color_selected_description
and $matches fish_pager_color_selected_prefix
and $matches fish_color_match --background=brblue
and for uvar in $argv
contains $uvar $checked_varnames
or test -z "$$uvar"

View File

@@ -14,7 +14,7 @@ function cd --description "Change directory"
end
# Skip history in subshells.
if status --is-command-substitution
if status is-command-substitution
builtin cd $argv
return $status
end

View File

@@ -1,18 +1,22 @@
### Command-not-found handlers
# This can be overridden by defining a new fish_command_not_found function
function fish_command_not_found
__fish_default_command_not_found_handler $argv
end
if not status is-interactive
exit
end
# Read the OS/Distro from /etc/os-release.
# This has a "ID=" line that defines the exact distribution,
# and an "ID_LIKE=" line that defines what it is derived from or otherwise like.
# For our purposes, we use both.
set -l os
if test -r /etc/os-release
set os (string match -r '^ID(?:_LIKE)?\s*=.*' < /etc/os-release | \
string replace -r '^ID(?:_LIKE)?\s*=(.*)' '$1' | string trim -c '\'"' | string split " ")
end
function __fish_default_command_not_found_handler
printf (_ "fish: Unknown command: %s\n") (string escape -- $argv[1]) >&2
set os (string replace -rf '^ID(?:_LIKE)?\s*=(.*)' '$1' < /etc/os-release |
string trim -c '\'"' | string split " ")
end
# If an old handler already exists, defer to that.
@@ -73,9 +77,4 @@ else if type -q pkgfile
# __fish_default_command_not_found_handler $argv[1]
# pacman -F $paths
# end
else
# Use standard fish command not found handler otherwise
function fish_command_not_found --on-event fish_command_not_found
__fish_default_command_not_found_handler $argv
end
end

View File

@@ -663,31 +663,25 @@ end
function __fish_git_prompt_reset -a type -a op -a var --description "Event handler, resets prompt when functionality changes" \
--on-variable=__fish_git_prompt_{show_informative_status,use_informative_chars}
if status --is-interactive
# Clear characters that have different defaults with/without informative status
set -e ___fish_git_prompt_char_{name,cleanstate,dirtystate,invalidstate,stagedstate,stashstate,stateseparator,untrackedfiles,upstream_ahead,upstream_behind}
# Clear init so we reset the chars next time.
set -e ___fish_git_prompt_init
end
# Clear characters that have different defaults with/without informative status
set -e ___fish_git_prompt_char_{name,cleanstate,dirtystate,invalidstate,stagedstate,stashstate,stateseparator,untrackedfiles,upstream_ahead,upstream_behind}
# Clear init so we reset the chars next time.
set -e ___fish_git_prompt_init
end
function __fish_git_prompt_reset_color -a type -a op -a var --description "Event handler, resets prompt when any color changes" \
--on-variable=__fish_git_prompt_color{'',_prefix,_suffix,_bare,_merging,_cleanstate,_invalidstate,_upstream,_flags,_branch,_dirtystate,_stagedstate,_branch_detached,_stashstate,_untrackedfiles} --on-variable=__fish_git_prompt_showcolorhints
if status --is-interactive
set -e _$var
set -e _{$var}_done
set -e ___fish_git_prompt_init
if contains -- $var __fish_git_prompt_color __fish_git_prompt_color_flags __fish_git_prompt_showcolorhints
# reset all the other colors too
set -e ___fish_git_prompt_color_{prefix,suffix,bare,merging,branch,dirtystate,stagedstate,invalidstate,stashstate,untrackedfiles,upstream,flags}{,_done}
end
set -e _$var
set -e _{$var}_done
set -e ___fish_git_prompt_init
if contains -- $var __fish_git_prompt_color __fish_git_prompt_color_flags __fish_git_prompt_showcolorhints
# reset all the other colors too
set -e ___fish_git_prompt_color_{prefix,suffix,bare,merging,branch,dirtystate,stagedstate,invalidstate,stashstate,untrackedfiles,upstream,flags}{,_done}
end
end
function __fish_git_prompt_reset_char -a type -a op -a var --description "Event handler, resets prompt when any char changes" \
--on-variable=__fish_git_prompt_char_{cleanstate,dirtystate,invalidstate,stagedstate,stashstate,stateseparator,untrackedfiles,upstream_ahead,upstream_behind,upstream_diverged,upstream_equal,upstream_prefix}
if status --is-interactive
set -e ___fish_git_prompt_init
set -e _$var
end
set -e ___fish_git_prompt_init
set -e _$var
end

View File

@@ -13,7 +13,7 @@ function psub --description "Read from stdin into a file and output the filename
set -l filename
set -l funcname
if not status --is-command-substitution
if not status is-command-substitution
{
printf (_ "%s: Not inside of command substitution") psub
echo

View File

@@ -294,7 +294,7 @@ mod tests {
#[serial]
fn test_abbreviations() {
test_init();
let parser = TestParser::new();
let parser = &mut TestParser::new();
{
let mut abbrs = abbrs_get_set();
abbrs.add(Abbreviation::new(
@@ -352,12 +352,12 @@ macro_rules! abbr_expand_1 {
abbr_expand_1!("gc", cmd, "git checkout");
abbr_expand_1!("foo", cmd, "bar");
let expand_abbreviation_in_command =
let mut expand_abbreviation_in_command =
|cmdline: &wstr, cursor_pos: Option<usize>| -> Option<WString> {
let replacement = reader_expand_abbreviation_at_cursor(
cmdline,
cursor_pos.unwrap_or(cmdline.len()),
&parser,
parser,
)?;
let mut cmdline_expanded = cmdline.to_owned();
let mut colors = vec![HighlightSpec::new(); cmdline.len()];

View File

@@ -122,12 +122,12 @@ pub fn resolve_command(&mut self, cmd: &wstr, env: &dyn Environment) -> Autoload
/// Helper to actually perform an autoload.
/// This is a static function because it executes fish script, and so must be called without
/// holding any particular locks.
pub fn perform_autoload(path: &AutoloadPath, parser: &Parser) {
pub fn perform_autoload(path: &AutoloadPath, parser: &mut Parser) {
// We do the useful part of what exec_subshell does ourselves
// - we source the file.
// We don't create a buffer or check ifs or create a read_limit
let prev_statuses = parser.last_statuses();
let _put_back = ScopeGuard::new((), |()| parser.set_last_statuses(prev_statuses));
let mut parser = ScopeGuard::new(parser, |parser| parser.set_last_statuses(prev_statuses));
match path {
AutoloadPath::OnDisk(p) => {
let script_source = L!("source ").to_owned() + &escape(p)[..];

View File

@@ -139,7 +139,7 @@ fn print_rusage_self() {
// Source the file config.fish in the given directory.
// Returns true if successful, false if not.
fn source_config_in_directory(parser: &Parser, dir: &wstr) -> bool {
fn source_config_in_directory(parser: &mut Parser, dir: &wstr) -> bool {
// If the config.fish file doesn't exist or isn't readable silently return. Fish versions up
// thru 2.2.0 would instead try to source the file with stderr redirected to /dev/null to deal
// with that possibility.
@@ -168,7 +168,7 @@ fn source_config_in_directory(parser: &Parser, dir: &wstr) -> bool {
}
/// Parse init files. exec_path is the path of fish executable as determined by argv[0].
fn read_init(parser: &Parser, paths: &ConfigPaths) {
fn read_init(parser: &mut Parser, paths: &ConfigPaths) {
use fish::autoload::Asset;
let emfile = Asset::get("config.fish").expect("Embedded file not found");
let src = bytes2wcstring(&emfile.data);
@@ -190,7 +190,7 @@ fn read_init(parser: &Parser, paths: &ConfigPaths) {
}
}
fn run_command_list(parser: &Parser, cmds: &[OsString]) -> Result<(), libc::c_int> {
fn run_command_list(parser: &mut Parser, cmds: &[OsString]) -> Result<(), libc::c_int> {
let mut retval = Ok(());
for cmd in cmds {
let cmd_wcs = osstr2wcstring(cmd);
@@ -490,7 +490,7 @@ fn throwing_main() -> i32 {
// Construct the root parser!
let env = EnvStack::globals().create_child(true /* dispatches_var_changes */);
let parser = &Parser::new(env, CancelBehavior::Clear);
let parser = &mut Parser::new(env, CancelBehavior::Clear);
parser.set_syncs_uvars(!opts.no_config);
if !opts.no_exec && !opts.no_config {

View File

@@ -120,7 +120,7 @@ fn join(list: &[&wstr], sep: &wstr) -> WString {
}
// Print abbreviations in a fish-script friendly way.
fn abbr_show(opts: &Options, streams: &mut IoStreams, parser: &Parser) -> BuiltinResult {
fn abbr_show(opts: &Options, streams: &mut IoStreams, parser: &mut Parser) -> BuiltinResult {
let style = EscapeStringStyle::Script(Default::default());
abbrs::with_abbrs(|abbrs| {
@@ -172,7 +172,7 @@ fn abbr_show(opts: &Options, streams: &mut IoStreams, parser: &Parser) -> Builti
if opts.color.enabled(streams) {
streams.out.append(&bytes2wcstring(&highlight_and_colorize(
&result,
&parser.context(),
&mut parser.context(),
)));
} else {
streams.out.append(&result);
@@ -423,7 +423,7 @@ fn abbr_add(opts: &Options, streams: &mut IoStreams) -> BuiltinResult {
}
// Erase the named abbreviations.
fn abbr_erase(opts: &Options, parser: &Parser) -> BuiltinResult {
fn abbr_erase(opts: &Options, parser: &mut Parser) -> BuiltinResult {
if opts.args.is_empty() {
// This has historically been a silent failure.
return Err(STATUS_CMD_ERROR);
@@ -454,7 +454,7 @@ fn abbr_erase(opts: &Options, parser: &Parser) -> BuiltinResult {
})
}
pub fn abbr(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
pub fn abbr(parser: &mut Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
let mut argv_read = Vec::with_capacity(argv.len());
argv_read.extend_from_slice(argv);

View File

@@ -663,7 +663,7 @@ fn populate_option_strings<'args>(
}
fn validate_arg<'opts>(
parser: &Parser,
parser: &mut Parser,
opts_name: &wstr,
opt_spec: &mut OptionSpec<'opts>,
is_long_flag: bool,
@@ -732,7 +732,7 @@ fn is_implicit_int(opts: &ArgParseCmdOpts, val: &wstr) -> bool {
// Store this value under the implicit int option.
fn validate_and_store_implicit_int<'args>(
parser: &Parser,
parser: &mut Parser,
opts: &mut ArgParseCmdOpts<'args>,
val: &'args wstr,
w: &mut WGetopter,
@@ -823,7 +823,7 @@ fn delete_flag<'args>(w: &mut WGetopter<'_, 'args, '_>, is_long_flag: bool) -> C
}
fn handle_flag<'args>(
parser: &Parser,
parser: &mut Parser,
opts: &mut ArgParseCmdOpts<'args>,
opt: char,
is_long_flag: bool,
@@ -874,7 +874,7 @@ fn handle_flag<'args>(
}
fn argparse_parse_flags<'args>(
parser: &Parser,
parser: &mut Parser,
opts: &mut ArgParseCmdOpts<'args>,
argc: usize,
args: &mut [&'args wstr],
@@ -1067,7 +1067,7 @@ fn argparse_parse_args<'args>(
opts: &mut ArgParseCmdOpts<'args>,
args: &mut [&'args wstr],
argc: usize,
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
) -> BuiltinResult {
if argc <= 1 {
@@ -1146,7 +1146,7 @@ fn set_argparse_result_vars(vars: &EnvStack, local_mode: EnvSetMode, opts: ArgPa
/// an external command also means its output has to be in a form that can be eval'd. Because our
/// version is a builtin it can directly set variables local to the current scope (e.g., a
/// function). It doesn't need to write anything to stdout that then needs to be eval'd.
pub fn argparse(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
pub fn argparse(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
let Some(&cmd) = args.first() else {
return Err(STATUS_INVALID_ARGS);
};

View File

@@ -8,7 +8,7 @@
/// Helper function for builtin_bg().
fn send_to_bg(
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
cmd: &wstr,
job_pos: usize,
@@ -46,7 +46,7 @@ fn send_to_bg(
}
/// Builtin for putting a job in the background.
pub fn bg(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
pub fn bg(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
let opts = HelpOnlyCmdOpts::parse(args, parser, streams)?;
let Some(&cmd) = args.first() else {

View File

@@ -151,7 +151,7 @@ fn list_one(
seq: &[Key],
bind_mode: Option<&wstr>,
user: bool,
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
) -> bool {
let results = self.input_mappings.get(seq, bind_mode, user);
@@ -167,7 +167,7 @@ fn list_one(
if self.opts.color.enabled(streams) {
streams.out.append(&bytes2wcstring(&highlight_and_colorize(
&out,
&parser.context(),
&mut parser.context(),
)));
} else {
streams.out.append(&out);
@@ -187,7 +187,7 @@ fn list_one_user_andor_preset(
bind_mode: Option<&wstr>,
user: bool,
preset: bool,
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
) -> bool {
let mut retval = false;
@@ -201,7 +201,13 @@ fn list_one_user_andor_preset(
}
/// List all current key bindings.
fn list(&self, bind_mode: Option<&wstr>, user: bool, parser: &Parser, streams: &mut IoStreams) {
fn list(
&self,
bind_mode: Option<&wstr>,
user: bool,
parser: &mut Parser,
streams: &mut IoStreams,
) {
let lst = self.input_mappings.get_names(user);
for binding in lst {
if bind_mode.is_some_and(|m| m != binding.mode) {
@@ -301,7 +307,7 @@ fn insert(
&mut self,
optind: usize,
argv: &[&wstr],
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
) -> bool {
let argc = argv.len();
@@ -407,7 +413,7 @@ fn parse_cmd_opts(
opts: &mut Options,
optind: &mut usize,
argv: &mut [&wstr],
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
) -> BuiltinResult {
let cmd = argv[0];
@@ -509,7 +515,7 @@ impl BuiltinBind {
/// The bind builtin, used for setting character sequences.
pub fn bind(
&mut self,
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
argv: &mut [&wstr],
) -> BuiltinResult {
@@ -568,6 +574,6 @@ pub fn bind(
}
}
pub fn bind(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
pub fn bind(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
BuiltinBind::new().bind(parser, streams, args)
}

View File

@@ -1,5 +1,3 @@
use std::sync::atomic::Ordering;
use crate::err_str;
// Implementation of the block builtin.
@@ -74,7 +72,7 @@ fn parse_options(
}
/// The block builtin, used for temporarily blocking events.
pub fn block(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
pub fn block(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
let cmd = args[0];
let (opts, _) = parse_options(args, parser, streams)?;
@@ -92,11 +90,11 @@ pub fn block(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> Bu
return Err(STATUS_INVALID_ARGS);
}
if parser.global_event_blocks.load(Ordering::Relaxed) == 0 {
if parser.global_event_blocks == 0 {
err_str!("No blocks defined").cmd(cmd).finish(streams);
return Err(STATUS_CMD_ERROR);
}
parser.global_event_blocks.fetch_sub(1, Ordering::Relaxed);
parser.global_event_blocks -= 1;
return Ok(SUCCESS);
}
@@ -135,7 +133,7 @@ pub fn block(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> Bu
if have_block {
parser.block_at_index_mut(block_idx).unwrap().event_blocks |= true;
} else {
parser.global_event_blocks.fetch_add(1, Ordering::Relaxed);
parser.global_event_blocks += 1;
}
Ok(SUCCESS)

View File

@@ -1,5 +1,5 @@
use super::prelude::*;
pub fn r#break(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
pub fn r#break(parser: &mut Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
builtin_break_continue(parser, streams, argv)
}

View File

@@ -6,7 +6,11 @@
use libc::STDIN_FILENO;
/// Implementation of the builtin breakpoint command, used to launch the interactive debugger.
pub fn breakpoint(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
pub fn breakpoint(
parser: &mut Parser,
streams: &mut IoStreams,
argv: &mut [&wstr],
) -> BuiltinResult {
let cmd = argv[0];
if argv.len() != 1 {
err_fmt!(Error::UNEXP_ARG_COUNT, 0, argv.len() - 1)

View File

@@ -8,7 +8,11 @@ struct builtin_cmd_opts_t {
list_names: bool,
}
pub fn r#builtin(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
pub fn r#builtin(
parser: &mut Parser,
streams: &mut IoStreams,
argv: &mut [&wstr],
) -> BuiltinResult {
let cmd = argv[0];
let argc = argv.len();
let print_hints = false;

View File

@@ -15,7 +15,7 @@
// The cd builtin. Changes the current directory to the one specified or to $HOME if none is
// specified. The directory can be relative to any directory in the CDPATH variable.
pub fn cd(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
pub fn cd(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
localizable_consts! {
DIR_DOES_NOT_EXIST
"The directory '%s' does not exist"

View File

@@ -8,7 +8,11 @@ struct command_cmd_opts_t {
find_path: bool,
}
pub fn r#command(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
pub fn r#command(
parser: &mut Parser,
streams: &mut IoStreams,
argv: &mut [&wstr],
) -> BuiltinResult {
let cmd = argv[0];
let argc = argv.len();
let print_hints = false;

View File

@@ -148,7 +148,7 @@ fn strip_dollar_prefixes(insert_mode: AppendMode, prefix: &wstr, insert: &wstr)
/// \param cursor_pos the position of the cursor in the command line
#[allow(clippy::too_many_arguments)]
fn write_part(
parser: &Parser,
parser: &mut Parser,
range: Range<usize>,
range_is_single_token: bool,
cut_at_cursor: bool,
@@ -179,7 +179,7 @@ fn write_part(
token_text.to_owned(),
&mut args,
ExpandFlags::SKIP_CMDSUBST,
&OperationContext::foreground(
&mut OperationContext::foreground(
parser,
Box::new(no_cancel),
COMMANDLINE_TOKENS_MAX_EXPANSION,
@@ -242,7 +242,11 @@ fn write_part(
}
/// The commandline builtin. It is used for specifying a new value for the commandline.
pub fn commandline(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
pub fn commandline(
parser: &mut Parser,
streams: &mut IoStreams,
args: &mut [&wstr],
) -> BuiltinResult {
let rstate = commandline_get_state(true);
let mut buffer_part = None;
@@ -684,7 +688,7 @@ pub fn commandline(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr])
} else if let Some(override_buffer) = &override_buffer {
current_buffer = override_buffer;
current_cursor_pos = current_buffer.len();
} else if parser.libdata().transient_commandline.is_some() {
} else if parser.libdata().transient_commandline.borrow().is_some() {
if cursor_mode && positional_args != 0 {
err_str!("setting cursor while evaluating 'complete --arguments' is not yet supported")
.cmd(cmd)
@@ -695,12 +699,13 @@ pub fn commandline(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr])
transient = parser
.libdata()
.transient_commandline
.borrow()
.as_ref()
.unwrap()
.clone();
current_buffer = &transient;
current_cursor_pos = transient.len();
} else if parser.interactive_initialized.load() || is_interactive_session() {
} else if parser.interactive_initialized || is_interactive_session() {
current_buffer = &rstate.text;
current_cursor_pos = rstate.cursor_pos;
} else {

View File

@@ -14,7 +14,7 @@
proc::is_interactive_session,
reader::{commandline_get_state, completion_apply_to_command_line},
};
use fish_common::{ScopeGuard, UnescapeFlags, UnescapeStringStyle, unescape_string};
use fish_common::{UnescapeFlags, UnescapeStringStyle, unescape_string};
use fish_wcstringutil::string_suffixes_string;
use fish_widestring::bytes2wcstring;
@@ -222,7 +222,7 @@ fn builtin_complete_remove(
fn builtin_complete_print(
cmd: &wstr,
streams: &mut IoStreams,
parser: &Parser,
parser: &mut Parser,
color: ColorEnabled,
) {
let repr = complete_print(cmd);
@@ -230,7 +230,7 @@ fn builtin_complete_print(
if color.enabled(streams) {
streams.out.append(&bytes2wcstring(&highlight_and_colorize(
&repr,
&parser.context(),
&mut parser.context(),
)));
} else {
streams.out.append(&repr);
@@ -242,7 +242,7 @@ fn builtin_complete_print(
/// The complete builtin. Used for specifying programmable tab-completions. Calls the functions in
/// complete.rs for any heavy lifting.
pub fn complete(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
pub fn complete(parser: &mut Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
localizable_consts! {
OPTION_REQUIRES_NON_EMPTY_STRING
"%s requires a non-empty string"
@@ -486,7 +486,7 @@ pub fn complete(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) ->
None => {
// No argument given, try to use the current commandline.
let commandline_state = commandline_get_state(true);
if !parser.interactive_initialized.load() && !is_interactive_session() {
if !parser.interactive_initialized && !is_interactive_session() {
err_str!("Can not get commandline in non-interactive mode")
.cmd(cmd)
.finish(streams);
@@ -501,13 +501,10 @@ pub fn complete(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) ->
// Create a scoped transient command line, so that builtin_commandline will see our
// argument, not the reader buffer.
let saved_transient = parser
.libdata_mut()
let _remove_transient = parser
.libdata()
.transient_commandline
.replace(do_complete_param.clone());
let _remove_transient = ScopeGuard::new((), |()| {
parser.libdata_mut().transient_commandline = saved_transient;
});
.scoped_replace(Some(do_complete_param.clone()));
// Prevent accidental recursion (see #6171).
if !parser.libdata().builtin_complete_current_commandline {
@@ -518,7 +515,7 @@ pub fn complete(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) ->
let (mut comp, _needs_load) = crate::complete::complete(
&do_complete_param,
CompletionRequestOptions::normal(),
&parser.context(),
&mut parser.context(),
);
// Apply the same sort and deduplication treatment as pager completions
@@ -529,7 +526,7 @@ pub fn complete(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) ->
let faux_cmdline = &do_complete_param[token.clone()];
let mut tmp_cursor = faux_cmdline.len();
let mut faux_cmdline_with_completion = completion_apply_to_command_line(
&OperationContext::background_interruptible(parser.vars()),
&mut OperationContext::background_interruptible(parser.vars()),
&next.completion,
next.flags,
faux_cmdline,

View File

@@ -52,7 +52,7 @@ fn parse_options(
/// Implementation of the builtin contains command, used to check if a specified string is part of
/// a list.
pub fn contains(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
pub fn contains(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
let cmd = args[0];
let (opts, optind) = parse_options(args, parser, streams)?;

View File

@@ -1,5 +1,9 @@
use super::prelude::*;
pub fn r#continue(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
pub fn r#continue(
parser: &mut Parser,
streams: &mut IoStreams,
argv: &mut [&wstr],
) -> BuiltinResult {
builtin_break_continue(parser, streams, argv)
}

View File

@@ -5,7 +5,7 @@
const COUNT_CHUNK_SIZE: usize = 512 * 256;
/// Implementation of the builtin count command, used to count the number of arguments sent to it.
pub fn count(_parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
pub fn count(_parser: &mut Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
// Always add the size of argv (minus 0, which is "count").
// That means if you call `something | count a b c`, you'll get the count of something _plus 3_.
let mut numargs = argv.len() - 1;

View File

@@ -40,7 +40,7 @@ fn disown_job(cmd: &wstr, streams: &mut IoStreams, j: &Job) {
}
/// Builtin for removing jobs from the job list.
pub fn disown(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
pub fn disown(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
let opts = HelpOnlyCmdOpts::parse(args, parser, streams)?;
let cmd = args[0];

View File

@@ -22,7 +22,7 @@ fn default() -> Self {
fn parse_options(
args: &mut [&wstr],
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
) -> Result<(Options, usize), ErrorCode> {
let Some(&cmd) = args.first() else {
@@ -140,7 +140,7 @@ fn parse_numeric_sequence<I>(chars: I) -> Option<(usize, u8)>
///
/// Bash only respects `-n` if it's the first argument. We'll do the same. We also support a new,
/// fish specific, option `-s` to mean "no spaces".
pub fn echo(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
pub fn echo(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
let (opts, optind) = parse_options(args, parser, streams)?;
// The special character \c can be used to indicate no more output.

View File

@@ -1,7 +1,7 @@
use super::prelude::*;
use crate::{err_str, event};
pub fn emit(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
pub fn emit(parser: &mut Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
let Some(&cmd) = argv.first() else {
return Err(STATUS_INVALID_ARGS);
};

View File

@@ -6,7 +6,7 @@
use fish_wcstringutil::join_strings;
use libc::{STDERR_FILENO, STDOUT_FILENO};
pub fn eval(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
pub fn eval(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
let argc = args.len();
if argc <= 1 {
return Ok(SUCCESS);

View File

@@ -4,7 +4,7 @@
use super::r#return::parse_return_value;
/// Function for handling the exit builtin.
pub fn exit(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
pub fn exit(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
let retval = match parse_return_value(args, parser, streams) {
ControlFlow::Continue(r) => r,
ControlFlow::Break(result) => return result,

View File

@@ -1,5 +1,9 @@
use super::prelude::*;
pub fn r#false(_parser: &Parser, _streams: &mut IoStreams, _argv: &mut [&wstr]) -> BuiltinResult {
pub fn r#false(
_parser: &mut Parser,
_streams: &mut IoStreams,
_argv: &mut [&wstr],
) -> BuiltinResult {
Err(STATUS_CMD_ERROR)
}

View File

@@ -15,7 +15,7 @@
use super::prelude::*;
/// Builtin for putting a job in the foreground.
pub fn fg(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
pub fn fg(parser: &mut Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
let opts = HelpOnlyCmdOpts::parse(argv, parser, streams)?;
let Some(&cmd) = argv.first() else {

View File

@@ -950,13 +950,17 @@ fn throwing_main() -> i32 {
do_indent(None, &mut streams, args).builtin_status_code()
}
pub fn fish_indent(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
pub fn fish_indent(
parser: &mut Parser,
streams: &mut IoStreams,
args: &mut [&wstr],
) -> BuiltinResult {
let args = args.iter_mut().map(|x| x.to_owned()).collect();
do_indent(Some(parser), streams, args)
}
fn do_indent(
parser: Option<&Parser>,
parser: Option<&mut Parser>,
streams: &mut IoStreams,
args: Vec<WString>,
) -> BuiltinResult {
@@ -1139,7 +1143,7 @@ enum OutputType {
highlight_shell(
&output_wtext,
&mut colors,
&OperationContext::globals(),
&mut OperationContext::globals(),
false,
None,
);
@@ -1214,7 +1218,13 @@ fn read_file(mut f: impl Read) -> Result<WString, ()> {
// 3,7,command
fn make_pygments_csv(src: &wstr) -> Vec<u8> {
let mut colors = vec![];
highlight_shell(src, &mut colors, &OperationContext::globals(), false, None);
highlight_shell(
src,
&mut colors,
&mut OperationContext::globals(),
false,
None,
);
assert_eq!(
colors.len(),
src.len(),

View File

@@ -174,7 +174,7 @@ fn setup_and_process_keys(
}
fn parse_flags(
parser: Option<&Parser>,
parser: Option<&mut Parser>,
streams: &mut IoStreams,
args: Vec<WString>,
continuous_mode: &mut bool,
@@ -239,7 +239,7 @@ fn parse_flags(
}
pub fn fish_key_reader(
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
args: &mut [&wstr],
) -> BuiltinResult {

View File

@@ -290,7 +290,7 @@ fn validate_function_name(
/// function. Note this isn't strictly a "builtin": it is called directly from parse_execution.
/// That is why its signature is different from the other builtins.
pub fn function(
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
c_args: &mut [&wstr],
func_node: NodeRef<BlockStatement>,

View File

@@ -56,7 +56,7 @@ fn parse_cmd_opts<'args>(
opts: &mut FunctionsCmdOpts<'args>,
optind: &mut usize,
argv: &mut [&'args wstr],
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
) -> BuiltinResult {
let cmd = L!("functions");
@@ -119,7 +119,11 @@ fn parse_cmd_opts<'args>(
Ok(SUCCESS)
}
pub fn functions(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
pub fn functions(
parser: &mut Parser,
streams: &mut IoStreams,
args: &mut [&wstr],
) -> BuiltinResult {
let Some(&cmd) = args.first() else {
return Err(STATUS_INVALID_ARGS);
};
@@ -435,7 +439,7 @@ pub fn functions(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -
if opts.color.enabled(streams) {
streams.out.append(&bytes2wcstring(&highlight_and_colorize(
&def,
&parser.context(),
&mut parser.context(),
)));
} else {
streams.out.append(&def);

View File

@@ -4,7 +4,7 @@
/// For scripts in `share/`, the corresponding strings are extracted from the scripts using
/// `cargo xtask gettext update`.
/// Strings not present in our repo would require a custom MO file for translation to be possible.
pub fn gettext(_parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
pub fn gettext(_parser: &mut Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
for arg in &argv[1..] {
streams.out.append(
crate::localization::LocalizableString::from_external_source((*arg).to_owned())

View File

@@ -237,7 +237,7 @@ fn parse_cmd_opts(
}
/// Manipulate history of interactive commands executed by the user.
pub fn history(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
pub fn history(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
let mut opts = HistoryCmdOpts::default();
let mut optind = 0;

View File

@@ -139,7 +139,7 @@ fn builtin_jobs_print(j: &Job, mode: JobsPrintMode, header: bool, streams: &mut
];
/// The jobs builtin. Used for printing running jobs. Defined in builtin_jobs.c.
pub fn jobs(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
pub fn jobs(parser: &mut Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
let cmd = match argv.first() {
Some(cmd) => *cmd,
None => return Err(STATUS_INVALID_ARGS),

View File

@@ -30,7 +30,7 @@ struct Options {
fn parse_cmd_opts(
args: &mut [&wstr],
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
) -> Result<(Options, usize), ErrorCode> {
let cmd = L!("math");
@@ -275,7 +275,7 @@ fn evaluate_expression(
const MATH_CHUNK_SIZE: usize = 1024;
/// The math builtin evaluates math expressions.
pub fn math(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
pub fn math(parser: &mut Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
let cmd = argv[0];
let (opts, mut optind) = parse_cmd_opts(argv, parser, streams)?;

View File

@@ -215,7 +215,7 @@ fn parse_opts<'args>(
optind: &mut usize,
n_req_args: usize,
args: &mut [&'args wstr],
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
) -> BuiltinResult {
let cmd = L!("path");
@@ -391,7 +391,7 @@ fn parse_opts<'args>(
}
fn path_transform(
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
args: &mut [&wstr],
func: impl Fn(&wstr) -> WString,
@@ -437,7 +437,11 @@ fn path_transform(
}
}
fn path_basename(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
fn path_basename(
parser: &mut Parser,
streams: &mut IoStreams,
args: &mut [&wstr],
) -> BuiltinResult {
path_transform(
parser,
streams,
@@ -449,7 +453,7 @@ fn path_basename(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -
)
}
fn path_dirname(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
fn path_dirname(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
path_transform(parser, streams, args, |s| wdirname(s).to_owned(), |_| {})
}
@@ -461,11 +465,15 @@ fn normalize_help(path: &wstr) -> WString {
np
}
fn path_normalize(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
fn path_normalize(
parser: &mut Parser,
streams: &mut IoStreams,
args: &mut [&wstr],
) -> BuiltinResult {
path_transform(parser, streams, args, normalize_help, |_| {})
}
fn path_mtime(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
fn path_mtime(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
let mut opts = Options {
relative_valid: true,
..Default::default()
@@ -534,7 +542,11 @@ fn find_extension(path: &wstr) -> Option<usize> {
}
}
fn path_extension(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
fn path_extension(
parser: &mut Parser,
streams: &mut IoStreams,
args: &mut [&wstr],
) -> BuiltinResult {
let mut opts = Options::default();
let mut optind = 0;
@@ -570,7 +582,7 @@ fn path_extension(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr])
}
fn path_change_extension(
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
args: &mut [&wstr],
) -> BuiltinResult {
@@ -616,7 +628,7 @@ fn path_change_extension(
}
}
fn path_resolve(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
fn path_resolve(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
let mut opts = Options::default();
let mut optind = 0;
@@ -679,7 +691,7 @@ fn path_resolve(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) ->
}
}
fn path_sort(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
fn path_sort(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
let mut opts = Options {
reverse_valid: true,
unique_valid: true,
@@ -846,7 +858,7 @@ fn filter_path(opts: &Options, path: &wstr, uid: Option<Uid>, gid: Option<Gid>)
}
fn path_filter_maybe_is(
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
args: &mut [&wstr],
is_is: bool,
@@ -937,16 +949,16 @@ fn path_filter_maybe_is(
}
}
fn path_filter(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
fn path_filter(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
path_filter_maybe_is(parser, streams, args, false)
}
fn path_is(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
fn path_is(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
path_filter_maybe_is(parser, streams, args, true)
}
/// The path builtin, for handling paths.
pub fn path(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
pub fn path(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
let Some(&cmd) = args.first() else {
return Err(STATUS_INVALID_ARGS);
};

View File

@@ -746,7 +746,7 @@ fn append_output(&mut self, c: char) {
}
/// The printf builtin.
pub fn printf(_parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
pub fn printf(_parser: &mut Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
let mut argc = argv.len();
// Rebind argv as immutable slice (can't rearrange its elements), skipping the command name.

View File

@@ -12,7 +12,7 @@
wopt(L!("physical"), NoArgument, 'P'),
];
pub fn pwd(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
pub fn pwd(parser: &mut Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
let cmd = argv[0];
let argc = argv.len();
let mut resolve_symlinks = false;

View File

@@ -10,7 +10,7 @@
static RNG: LazyLock<Mutex<SmallRng>> =
LazyLock::new(|| Mutex::new(get_seeded_rng(rand::rng().next_u64())));
pub fn random(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
pub fn random(parser: &mut Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
let cmd = argv[0];
let argc = argv.len();
let print_hints = false;

View File

@@ -223,7 +223,7 @@ fn parse_cmd_opts(
/// we weren't asked to split on null characters.
#[allow(clippy::too_many_arguments)]
fn read_interactive(
parser: &Parser,
parser: &mut Parser,
buff: &mut WString,
nchars: Option<NonZeroUsize>,
shell: bool,
@@ -543,7 +543,7 @@ fn tokenize_flag(token_mode: TokenOutputMode) -> &'static wstr {
}
/// The read builtin. Reads from stdin and stores the values in environment variables.
pub fn read(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
pub fn read(parser: &mut Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
let mut buff = WString::new();
let mut exit_res: BuiltinResult;
@@ -575,7 +575,7 @@ pub fn read(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> Bui
let mut var_ptr = 0;
let vars_left = |var_ptr: usize| argc - var_ptr;
let clear_remaining_vars = |var_ptr: &mut usize| {
let clear_remaining_vars = |parser: &mut Parser, var_ptr: &mut usize| {
while vars_left(*var_ptr) != 0 {
parser.set_empty(argv[*var_ptr], opts.place);
*var_ptr += 1;
@@ -635,7 +635,7 @@ pub fn read(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> Bui
}
if exit_res.is_err() {
clear_remaining_vars(&mut var_ptr);
clear_remaining_vars(parser, &mut var_ptr);
return exit_res;
}
@@ -800,7 +800,7 @@ pub fn read(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> Bui
if !opts.array {
// In case there were more args than splits
clear_remaining_vars(&mut var_ptr);
clear_remaining_vars(parser, &mut var_ptr);
}
exit_res

View File

@@ -59,7 +59,7 @@ fn parse_options(
/// An implementation of the external realpath command. Doesn't support any options.
/// In general scripts shouldn't invoke this directly. They should just use `realpath` which
/// will fallback to this builtin if an external command cannot be found.
pub fn realpath(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
pub fn realpath(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
let cmd = args[0];
let (opts, optind) = parse_options(args, parser, streams)?;

View File

@@ -52,7 +52,7 @@ fn parse_options(
}
/// Function for handling the return builtin.
pub fn r#return(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
pub fn r#return(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
let mut retval = match parse_return_value(args, parser, streams) {
ControlFlow::Continue(r) => r,
ControlFlow::Break(result) => return result,
@@ -88,7 +88,7 @@ pub fn r#return(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) ->
pub fn parse_return_value(
args: &mut [&wstr],
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
) -> ControlFlow<BuiltinResult, i32> {
let cmd = args[0];

View File

@@ -84,7 +84,7 @@ fn env_mode(&self) -> EnvMode {
fn parse(
cmd: &wstr,
args: &mut [&wstr],
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
) -> Result<Option<(Options, usize)>, ErrorCode> {
/// Values used for long-only options.
@@ -376,7 +376,7 @@ fn env_set_reporting_errors(
mode: EnvMode,
list: Vec<WString>,
streams: &mut IoStreams,
parser: &Parser,
parser: &mut Parser,
) -> EnvStackSetResult {
let mode = ParserEnvSetMode::user(mode);
let retval = if opts.no_event {
@@ -779,7 +779,7 @@ fn show(cmd: &wstr, parser: &Parser, streams: &mut IoStreams, args: &[&wstr]) ->
fn erase(
cmd: &wstr,
opts: &Options,
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
args: &[&wstr],
) -> BuiltinResult {
@@ -949,7 +949,7 @@ fn new_var_values_by_index(split: &SplitVar, argv: &[&wstr]) -> Vec<WString> {
fn set_internal(
cmd: &wstr,
opts: &Options,
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
argv: &[&wstr],
) -> BuiltinResult {
@@ -1042,7 +1042,7 @@ fn set_internal(
}
/// The set builtin creates, updates, and erases (removes, deletes) variables.
pub fn set(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
pub fn set(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
let cmd = args[0];
let (opts, optind) = match Options::parse(cmd, args, parser, streams)? {
Some((opts, optind)) => (opts, optind),

View File

@@ -53,7 +53,11 @@ fn print_colors(
}
/// set_color builtin.
pub fn set_color(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
pub fn set_color(
parser: &mut Parser,
streams: &mut IoStreams,
argv: &mut [&wstr],
) -> BuiltinResult {
// Variables used for parsing the argument list.
let argc = argv.len();

View File

@@ -14,7 +14,7 @@
use fish_widestring::{L, bytes2wcstring, str2wcstring};
use std::io::{BufRead as _, BufReader, Read as _};
pub type BuiltinCmd = fn(&Parser, &mut IoStreams, &mut [&wstr]) -> BuiltinResult;
pub type BuiltinCmd = fn(&mut Parser, &mut IoStreams, &mut [&wstr]) -> BuiltinResult;
/// The default prompt for the read command.
pub const DEFAULT_READ_PROMPT: &wstr =
@@ -393,7 +393,7 @@ fn cmd_needs_help(cmd: &wstr) -> bool {
}
/// Execute a builtin command
pub fn builtin_run(parser: &Parser, argv: &mut [&wstr], streams: &mut IoStreams) -> ProcStatus {
pub fn builtin_run(parser: &mut Parser, argv: &mut [&wstr], streams: &mut IoStreams) -> ProcStatus {
if argv.is_empty() {
return ProcStatus::from_exit_code(STATUS_INVALID_ARGS);
}
@@ -546,7 +546,7 @@ pub fn builtin_get_desc(name: &wstr) -> Option<&'static wstr> {
/// builtin or function name to get up help for
///
/// Process and print help for the specified builtin or function.
pub fn builtin_print_help(parser: &Parser, streams: &mut IoStreams, cmd: &wstr) {
pub fn builtin_print_help(parser: &mut Parser, streams: &mut IoStreams, cmd: &wstr) {
// This won't ever work if no_exec is set.
if no_exec() {
return;
@@ -650,7 +650,7 @@ pub struct HelpOnlyCmdOpts {
impl HelpOnlyCmdOpts {
pub fn parse(
args: &mut [&wstr],
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
) -> Result<Self, ErrorCode> {
let cmd = args[0];
@@ -903,7 +903,11 @@ fn parsed_pid(
/// A generic builtin that only supports showing a help message. This is only a placeholder that
/// prints the help message. Useful for commands that live in the parser.
fn builtin_generic(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
fn builtin_generic(
parser: &mut Parser,
streams: &mut IoStreams,
argv: &mut [&wstr],
) -> BuiltinResult {
let argc = argv.len();
let opts = HelpOnlyCmdOpts::parse(argv, parser, streams)?;
@@ -925,7 +929,7 @@ fn builtin_generic(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr])
/// This function handles both the 'continue' and the 'break' builtins that are used for loop
/// control.
pub fn builtin_break_continue(
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
argv: &mut [&wstr],
) -> BuiltinResult {

View File

@@ -9,7 +9,7 @@
/// The source builtin, sometimes called `.`. Evaluates the contents of a file in the current
/// context.
pub fn source(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
pub fn source(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
let argc = args.len();
let opts = HelpOnlyCmdOpts::parse(args, parser, streams)?;

View File

@@ -340,7 +340,7 @@ fn iter() -> impl Iterator<Item = std::borrow::Cow<'static, str>> {
}
);
pub fn status(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
pub fn status(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
let cmd = args[0];
let argc = args.len();

View File

@@ -31,7 +31,7 @@ trait StringSubCommand<'args> {
fn parse_opts(
&mut self,
args: &mut [&'args wstr],
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
) -> Result<usize, ErrorCode> {
let cmd = L!("string");
@@ -98,7 +98,7 @@ fn take_args(
/// Perform the business logic of the command.
fn handle(
&mut self,
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
optind: &mut usize,
args: &[&'args wstr],
@@ -106,7 +106,7 @@ fn handle(
fn run(
&mut self,
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
args: &mut [&'args wstr],
) -> BuiltinResult {
@@ -118,7 +118,7 @@ fn run(
fn run_impl(
&mut self,
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
args: &mut [&'args wstr],
) -> Result<(), ErrorCode> {
@@ -280,7 +280,7 @@ fn arguments<'iter, 'args>(
}
/// The string builtin, for manipulating strings.
pub fn string(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
pub fn string(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
let cmd = args[0];
let argc = args.len();

View File

@@ -24,7 +24,7 @@ fn parse_opt(&mut self, c: char, _arg: Option<&wstr>) -> Result<(), StringError<
fn handle(
&mut self,
_parser: &Parser,
_parser: &mut Parser,
streams: &mut IoStreams,
optind: &mut usize,
args: &[&wstr],

View File

@@ -30,7 +30,7 @@ fn parse_opt(&mut self, c: char, arg: Option<&wstr>) -> Result<(), StringError<'
fn handle(
&mut self,
_parser: &Parser,
_parser: &mut Parser,
streams: &mut IoStreams,
optind: &mut usize,
args: &[&wstr],

View File

@@ -61,7 +61,7 @@ fn take_args(
fn handle(
&mut self,
_parser: &Parser,
_parser: &mut Parser,
streams: &mut IoStreams,
optind: &mut usize,
args: &[&wstr],

View File

@@ -24,7 +24,7 @@ fn parse_opt(&mut self, c: char, _arg: Option<&wstr>) -> Result<(), StringError<
fn handle(
&mut self,
_parser: &Parser,
_parser: &mut Parser,
streams: &mut IoStreams,
optind: &mut usize,
args: &[&wstr],

View File

@@ -88,7 +88,7 @@ fn take_args(
fn handle(
&mut self,
parser: &Parser,
parser: &mut Parser,
streams: &mut IoStreams,
optind: &mut usize,
args: &[&wstr],

View File

@@ -64,7 +64,7 @@ fn parse_opt(&mut self, c: char, arg: Option<&wstr>) -> Result<(), StringError<'
fn handle<'args>(
&mut self,
_parser: &Parser,
_parser: &mut Parser,
streams: &mut IoStreams,
optind: &mut usize,
args: &[&'args wstr],

View File

@@ -76,7 +76,7 @@ fn take_args(
fn handle(
&mut self,
_parser: &Parser,
_parser: &mut Parser,
streams: &mut IoStreams,
optind: &mut usize,
args: &[&wstr],

View File

@@ -82,7 +82,7 @@ fn take_args(
fn handle(
&mut self,
_parser: &Parser,
_parser: &mut Parser,
streams: &mut IoStreams,
optind: &mut usize,
args: &[&wstr],

View File

@@ -61,7 +61,7 @@ fn parse_opt(&mut self, c: char, arg: Option<&'args wstr>) -> Result<(), StringE
fn handle(
&mut self,
_parser: &Parser,
_parser: &mut Parser,
streams: &mut IoStreams,
optind: &mut usize,
args: &[&wstr],
@@ -166,8 +166,11 @@ fn handle(
pos += skip_escapes(&line, pos).max(1);
}
if self.quiet && pos != 0 {
return Ok(());
if self.quiet {
if pos != 0 {
return Ok(());
}
continue;
}
let output = match pos {
@@ -215,8 +218,11 @@ fn handle(
}
}
if self.quiet && pos != line.len() {
return Ok(());
if self.quiet {
if pos != line.len() {
return Ok(());
}
continue;
}
if pos == line.len() {

View File

@@ -166,7 +166,7 @@ fn take_args(
fn handle(
&mut self,
_parser: &Parser,
_parser: &mut Parser,
streams: &mut IoStreams,
optind: &mut usize,
args: &[&'args wstr],

View File

@@ -53,7 +53,7 @@ fn parse_opt(&mut self, c: char, arg: Option<&wstr>) -> Result<(), StringError<'
fn handle(
&mut self,
_parser: &Parser,
_parser: &mut Parser,
streams: &mut IoStreams,
optind: &mut usize,
args: &[&wstr],

View File

@@ -21,14 +21,14 @@ macro_rules! validate {
}
pub fn string_test(mut args: Vec<&wstr>) -> (WString, libc::c_int) {
let parser = TestParser::new();
let parser = &mut TestParser::new();
let mut outs = OutputStream::String(StringOutputStream::new());
let mut errs = OutputStream::Null;
let io_chain = IoChain::new();
let mut streams = IoStreams::new(&mut outs, &mut errs, &io_chain);
streams.stdin_is_directly_redirected = false; // read from argv instead of stdin
let rc = string(&parser, &mut streams, args.as_mut_slice());
let rc = string(parser, &mut streams, args.as_mut_slice());
(outs.contents().to_owned(), rc.builtin_status_code())
}

View File

@@ -18,7 +18,7 @@ fn parse_opt(&mut self, c: char, _arg: Option<&wstr>) -> Result<(), StringError<
fn handle(
&mut self,
_parser: &Parser,
_parser: &mut Parser,
streams: &mut IoStreams,
optind: &mut usize,
args: &[&wstr],

View File

@@ -41,7 +41,7 @@ fn parse_opt(&mut self, c: char, arg: Option<&'args wstr>) -> Result<(), StringE
fn handle(
&mut self,
_parser: &Parser,
_parser: &mut Parser,
streams: &mut IoStreams,
optind: &mut usize,
args: &[&wstr],

View File

@@ -32,7 +32,7 @@ fn parse_opt(&mut self, c: char, arg: Option<&wstr>) -> Result<(), StringError<'
fn handle(
&mut self,
_parser: &Parser,
_parser: &mut Parser,
streams: &mut IoStreams,
optind: &mut usize,
args: &[&wstr],

View File

@@ -984,7 +984,7 @@ fn unary_primary_evaluate(
/// Evaluate a conditional expression given the arguments. For POSIX conformance this
/// supports a more limited range of functionality.
/// Return status is the final shell status, i.e. 0 for true, 1 for false and 2 for error.
pub fn test(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
pub fn test(parser: &mut Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
// The first argument should be the name of the command ('test').
if argv.is_empty() {
return Err(STATUS_INVALID_ARGS);
@@ -1092,7 +1092,7 @@ mod tests {
use fish_widestring::str2wcstring;
fn run_one_test_test_mbracket(expected: i32, lst: &[&str], bracket: bool) -> bool {
let parser = TestParser::new();
let parser = &mut TestParser::new();
let mut argv = Vec::new();
if bracket {
argv.push(L!("[").to_owned());
@@ -1113,7 +1113,7 @@ fn run_one_test_test_mbracket(expected: i32, lst: &[&str], bracket: bool) -> boo
let io_chain = IoChain::new();
let mut streams = IoStreams::new(&mut out, &mut err, &io_chain);
let result = builtin_test(&parser, &mut streams, &mut argv).builtin_status_code();
let result = builtin_test(parser, &mut streams, &mut argv).builtin_status_code();
if result != expected {
eprintf!(
@@ -1134,7 +1134,7 @@ fn run_test_test(expected: i32, lst: &[&str]) -> bool {
fn test_test_brackets() {
// Ensure [ knows it needs a ].
let parser = TestParser::new();
let parser = &mut TestParser::new();
let mut out = OutputStream::Null;
let mut err = OutputStream::Null;
@@ -1143,16 +1143,16 @@ fn test_test_brackets() {
let args1 = &mut [L!("["), L!("foo")];
assert_eq!(
builtin_test(&parser, &mut streams, args1),
builtin_test(parser, &mut streams, args1),
Err(STATUS_INVALID_ARGS)
);
let args2 = &mut [L!("["), L!("foo"), L!("]")];
assert_eq!(builtin_test(&parser, &mut streams, args2), Ok(SUCCESS));
assert_eq!(builtin_test(parser, &mut streams, args2), Ok(SUCCESS));
let args3 = &mut [L!("["), L!("foo"), L!("]"), L!("bar")];
assert_eq!(
builtin_test(&parser, &mut streams, args3),
builtin_test(parser, &mut streams, args3),
Err(STATUS_INVALID_ARGS)
);
}

View File

@@ -1,5 +1,9 @@
use super::prelude::*;
pub fn r#true(_parser: &Parser, _streams: &mut IoStreams, _argv: &mut [&wstr]) -> BuiltinResult {
pub fn r#true(
_parser: &mut Parser,
_streams: &mut IoStreams,
_argv: &mut [&wstr],
) -> BuiltinResult {
Ok(SUCCESS)
}

View File

@@ -20,7 +20,7 @@ struct type_cmd_opts_t {
color: ColorEnabled,
}
pub fn r#type(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
pub fn r#type(parser: &mut Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> BuiltinResult {
let cmd = argv[0];
let argc = argv.len();
let print_hints = false;
@@ -168,7 +168,7 @@ pub fn r#type(parser: &Parser, streams: &mut IoStreams, argv: &mut [&wstr]) -> B
if opts.color.enabled(streams) {
streams.out.append(&bytes2wcstring(&highlight_and_colorize(
&def,
&parser.context(),
&mut parser.context(),
)));
} else {
streams.out.append(&def);

View File

@@ -250,7 +250,7 @@ fn default() -> Self {
}
}
pub fn ulimit(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
pub fn ulimit(parser: &mut Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> BuiltinResult {
let cmd = args[0];
const SHORT_OPTS: &wstr = L!("HSabcdefilmnqrstuvwyKPTh");

Some files were not shown because too many files have changed in this diff Show More