mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-19 14:51:13 -03:00
Compare commits
58 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3fa252677a | ||
|
|
e074b27abf | ||
|
|
a5727e59da | ||
|
|
4e68f8a130 | ||
|
|
417755b6a7 | ||
|
|
ef30feda12 | ||
|
|
20e3ed23b7 | ||
|
|
7bfdb8460d | ||
|
|
8d9d5816ed | ||
|
|
97f6129dea | ||
|
|
c19de5aeb9 | ||
|
|
874fba1108 | ||
|
|
695f225cb4 | ||
|
|
9f36adb731 | ||
|
|
3ff699d7ea | ||
|
|
4b6ad751e8 | ||
|
|
8dd90085b6 | ||
|
|
47396e78ce | ||
|
|
77a038541a | ||
|
|
84dbdf4e2a | ||
|
|
0a50ba9ef5 | ||
|
|
8b317a192b | ||
|
|
42decbf1da | ||
|
|
79b0d24701 | ||
|
|
1f6cd5fc2d | ||
|
|
635525be96 | ||
|
|
280791c0f5 | ||
|
|
91faa1be49 | ||
|
|
24e529ea07 | ||
|
|
595bfda331 | ||
|
|
0f358756a2 | ||
|
|
0ace46d127 | ||
|
|
a143a67318 | ||
|
|
047b9d96a0 | ||
|
|
c942b034ba | ||
|
|
0f1caacae4 | ||
|
|
f332cdc757 | ||
|
|
c6912c6721 | ||
|
|
678edbd223 | ||
|
|
1a78407efe | ||
|
|
3ecf1bc46d | ||
|
|
4d99e51e62 | ||
|
|
a9576d44e3 | ||
|
|
2c0e912fe1 | ||
|
|
1f96e58852 | ||
|
|
03f4bf262a | ||
|
|
bb61c948af | ||
|
|
fa59a736bf | ||
|
|
97dc8f69d9 | ||
|
|
57753474e4 | ||
|
|
d5f4cedeb5 | ||
|
|
ec4700308e | ||
|
|
1d5ae08696 | ||
|
|
bb5b583d63 | ||
|
|
7d80a599f2 | ||
|
|
284d8fa3d1 | ||
|
|
a03f52add0 | ||
|
|
89fa81123b |
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -80,7 +80,7 @@ jobs:
|
||||
with:
|
||||
targets: x86_64-unknown-linux-musl,aarch64-unknown-linux-musl
|
||||
- name: Install dependencies
|
||||
run: sudo apt install crossbuild-essential-arm64 musl-tools python3-sphinx
|
||||
run: sudo apt install crossbuild-essential-arm64 gettext musl-tools python3-sphinx
|
||||
- name: Build statically-linked executables
|
||||
run: |
|
||||
set -x
|
||||
|
||||
@@ -1,3 +1,37 @@
|
||||
fish 4.1.2 (released October 07, 2025)
|
||||
======================================
|
||||
|
||||
This release fixes the following regressions identified in 4.1.0:
|
||||
|
||||
- Fixed spurious error output when completing remote file paths for ``scp`` (:issue:`11860`).
|
||||
- Fixed the :kbd:`alt-l` binding not formatting ``ls`` output correctly (one entry per line, no colors) (:issue:`11888`).
|
||||
- Fixed an issue where focus events (currently only enabled in ``tmux``) would cause multiline prompts to be redrawn in the wrong line (:issue:`11870`).
|
||||
- Stopped printing output that would cause a glitch on old versions of Midnight Commander (:issue:`11869`).
|
||||
- Added a fix for some configurations of Zellij where :kbd:`escape` key processing was delayed (:issue:`11868`).
|
||||
- Fixed a case where the :doc:`web-based configuration tool <cmds/fish_config>` would generate invalid configuration (:issue:`11861`).
|
||||
- Fixed a case where pasting into ``fish -c read`` would fail with a noisy error (:issue:`11836`).
|
||||
- Fixed a case where upgrading fish would break old versions of fish that were still running.
|
||||
|
||||
In general, fish still needs to be restarted after it is upgraded,
|
||||
except for `standalone builds <https://github.com/fish-shell/fish-shell/?tab=readme-ov-file#building-fish-with-embedded-data-experimental>`__.
|
||||
|
||||
fish 4.1.1 (released September 30, 2025)
|
||||
========================================
|
||||
|
||||
This release fixes the following regressions identified in 4.1.0:
|
||||
|
||||
- Many of our new Chinese translations were more confusing than helpful; they have been fixed or removed (:issue:`11833`).
|
||||
|
||||
Note that you can work around this type of issue by configuring fish's :doc:`message localization <cmds/_>`:
|
||||
if your environment contains something like ``LANG=zh_CN.UTF-8``,
|
||||
you can use ``set -g LC_MESSAGES en`` to use English messages inside fish.
|
||||
This will not affect fish's child processes unless ``LC_MESSAGES`` was already exported.
|
||||
|
||||
- Some :doc:`fish_config <cmds/fish_config>` subcommands for showing prompts and themes had been broken in standalone Linux builds (those using the ``embed-data`` cargo feature), which has been fixed (:issue:`11832`).
|
||||
- On Windows Terminal, we observed an issue where fish would fail to read the terminal's response to our new startup queries, causing noticeable lags and a misleading error message. A workaround has been added (:issue:`11841`).
|
||||
- A WezTerm `issue breaking shifted key input <https://github.com/wezterm/wezterm/issues/6087>`__ has resurfaced on some versions of WezTerm; our workaround has been extended to cover all versions for now (:issue:`11204`).
|
||||
- Fixed a crash in :doc:`the web-based configuration tool <cmds/fish_config>` when using the new underline styles (:issue:`11840`).
|
||||
|
||||
fish 4.1.0 (released September 27, 2025)
|
||||
========================================
|
||||
|
||||
@@ -30,7 +64,7 @@ Deprecations and removed features
|
||||
- The ``--install`` option when fish is built as self-installing is removed, see :ref:`below <changelog-4.1-embedded>`.
|
||||
- ``set_color ff0000`` now outputs 24-bit RGB true-color even if :envvar:`COLORTERM` is unset.
|
||||
One can override this by setting :envvar:`fish_term24bit` to 0 (:issue:`11372`).
|
||||
- fish now requires the terminal to respond to queries for the :ref:`primary device attribute <term-compat-primary-da>`.
|
||||
- fish now requires the terminal to respond to queries for the :ref:`Primary Device Attribute <term-compat-primary-da>`.
|
||||
For now, this can be reversed via a :ref:`feature flag <featureflags>`,
|
||||
by running (once) ``set -Ua fish_features no-query-term`` and restarting fish.
|
||||
- Users of GNU screen may experience :ref:`minor glitches <term-compat-dcs-gnu-screen>` when starting fish.
|
||||
@@ -83,9 +117,6 @@ Improved terminal support
|
||||
- Support for double, curly, dotted and dashed underlines, for use in ``fish_color_*`` variables and the :doc:`set_color builtin <cmds/set_color>` (:issue:`10957`).
|
||||
- Underlines can now be colored independent of text (:issue:`7619`).
|
||||
- New documentation page :doc:`Terminal Compatibility <terminal-compatibility>` (also accessible via ``man fish-terminal-compatibility``) lists the terminal control sequences used by fish.
|
||||
- fish now requires the terminal to respond to queries for the :ref:`primary device attribute <term-compat-primary-da>`.
|
||||
For now, this can be reversed via a :ref:`feature flag <featureflags>`,
|
||||
by running (once) ``set -Ua fish_features no-query-term``.
|
||||
|
||||
Other improvements
|
||||
------------------
|
||||
|
||||
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -105,7 +105,7 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
|
||||
|
||||
[[package]]
|
||||
name = "fish"
|
||||
version = "4.1.0"
|
||||
version = "4.1.2"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cc",
|
||||
|
||||
@@ -64,7 +64,7 @@ debug = true
|
||||
|
||||
[package]
|
||||
name = "fish"
|
||||
version = "4.1.0"
|
||||
version = "4.1.2"
|
||||
edition.workspace = true
|
||||
rust-version.workspace = true
|
||||
default-run = "fish"
|
||||
|
||||
@@ -180,7 +180,7 @@ To install fish with embedded files, just use ``cargo``, like::
|
||||
cargo install --git https://github.com/fish-shell/fish-shell --tag "$(curl -s https://api.github.com/repos/fish-shell/fish-shell/releases/latest | jq -r .tag_name)" # to build the latest release
|
||||
cargo install --git https://github.com/fish-shell/fish-shell # to build the latest development snapshot
|
||||
|
||||
This will place the binaries in ``~/.cargo/bin/``, but you can place them wherever you want.
|
||||
This will place the standalone binaries in ``~/.cargo/bin/``, but you can place them wherever you want.
|
||||
|
||||
This build won't have the HTML docs (``help`` will open the online version).
|
||||
It will try to build the man pages with sphinx-build. If that is not available and you would like to include man pages, you need to install it and retrigger the build script, e.g. by setting FISH_BUILD_DOCS=1::
|
||||
|
||||
51
build.rs
51
build.rs
@@ -3,7 +3,6 @@
|
||||
use fish_build_helper::{fish_build_dir, workspace_root};
|
||||
use rsconf::Target;
|
||||
use std::env;
|
||||
use std::error::Error;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
fn canonicalize<P: AsRef<Path>>(path: P) -> PathBuf {
|
||||
@@ -17,7 +16,7 @@ fn main() {
|
||||
// language server.
|
||||
|
||||
rsconf::set_env_value(
|
||||
"FISH_BUILD_DIR",
|
||||
"FISH_RESOLVED_BUILD_DIR",
|
||||
// If set by CMake, this might include symlinks. Since we want to compare this to the
|
||||
// dir fish is executed in we need to canonicalize it.
|
||||
canonicalize(fish_build_dir()).to_str().unwrap(),
|
||||
@@ -81,53 +80,44 @@ fn detect_cfgs(target: &mut Target) {
|
||||
for (name, handler) in [
|
||||
// Ignore the first entry, it just sets up the type inference. Model new entries after the
|
||||
// second line.
|
||||
(
|
||||
"",
|
||||
&(|_: &Target| Ok(false)) as &dyn Fn(&Target) -> Result<bool, Box<dyn Error>>,
|
||||
),
|
||||
("", &(|_: &Target| false) as &dyn Fn(&Target) -> bool),
|
||||
("apple", &detect_apple),
|
||||
("bsd", &detect_bsd),
|
||||
("cygwin", &detect_cygwin),
|
||||
("small_main_stack", &has_small_stack),
|
||||
// See if libc supports the thread-safe localeconv_l(3) alternative to localeconv(3).
|
||||
("localeconv_l", &|target| {
|
||||
Ok(target.has_symbol("localeconv_l"))
|
||||
target.has_symbol("localeconv_l")
|
||||
}),
|
||||
("FISH_USE_POSIX_SPAWN", &|target| {
|
||||
Ok(target.has_header("spawn.h"))
|
||||
target.has_header("spawn.h")
|
||||
}),
|
||||
("HAVE_PIPE2", &|target| {
|
||||
Ok(target.has_symbol("pipe2"))
|
||||
target.has_symbol("pipe2")
|
||||
}),
|
||||
("HAVE_EVENTFD", &|target| {
|
||||
// FIXME: NetBSD 10 has eventfd, but the libc crate does not expose it.
|
||||
if cfg!(target_os = "netbsd") {
|
||||
Ok(false)
|
||||
false
|
||||
} else {
|
||||
Ok(target.has_header("sys/eventfd.h"))
|
||||
target.has_header("sys/eventfd.h")
|
||||
}
|
||||
}),
|
||||
("HAVE_WAITSTATUS_SIGNAL_RET", &|target| {
|
||||
Ok(target.r#if("WEXITSTATUS(0x007f) == 0x7f", &["sys/wait.h"]))
|
||||
target.r#if("WEXITSTATUS(0x007f) == 0x7f", &["sys/wait.h"])
|
||||
}),
|
||||
] {
|
||||
match handler(target) {
|
||||
Err(e) => {
|
||||
rsconf::warn!("{}: {}", name, e);
|
||||
rsconf::declare_cfg(name, false);
|
||||
},
|
||||
Ok(enabled) => rsconf::declare_cfg(name, enabled),
|
||||
}
|
||||
rsconf::declare_cfg(name, handler(target))
|
||||
}
|
||||
}
|
||||
|
||||
fn detect_apple(_: &Target) -> Result<bool, Box<dyn Error>> {
|
||||
Ok(cfg!(any(target_os = "ios", target_os = "macos")))
|
||||
fn detect_apple(_: &Target) -> bool {
|
||||
cfg!(any(target_os = "ios", target_os = "macos"))
|
||||
}
|
||||
|
||||
fn detect_cygwin(_: &Target) -> Result<bool, Box<dyn Error>> {
|
||||
fn detect_cygwin(_: &Target) -> bool {
|
||||
// Cygwin target is usually cross-compiled.
|
||||
Ok(std::env::var("CARGO_CFG_TARGET_OS").unwrap() == "cygwin")
|
||||
std::env::var("CARGO_CFG_TARGET_OS").unwrap() == "cygwin"
|
||||
}
|
||||
|
||||
/// Detect if we're being compiled for a BSD-derived OS, allowing targeting code conditionally with
|
||||
@@ -136,13 +126,14 @@ fn detect_cygwin(_: &Target) -> Result<bool, Box<dyn Error>> {
|
||||
/// Rust offers fine-grained conditional compilation per-os for the popular operating systems, but
|
||||
/// doesn't necessarily include less-popular forks nor does it group them into families more
|
||||
/// specific than "windows" vs "unix" so we can conditionally compile code for BSD systems.
|
||||
fn detect_bsd(_: &Target) -> Result<bool, Box<dyn Error>> {
|
||||
fn detect_bsd(_: &Target) -> bool {
|
||||
// Instead of using `uname`, we can inspect the TARGET env variable set by Cargo. This lets us
|
||||
// support cross-compilation scenarios.
|
||||
let mut target = std::env::var("TARGET").unwrap();
|
||||
if !target.chars().all(|c| c.is_ascii_lowercase()) {
|
||||
target = target.to_ascii_lowercase();
|
||||
}
|
||||
#[allow(clippy::let_and_return)] // for old clippy
|
||||
let is_bsd = target.ends_with("bsd") || target.ends_with("dragonfly");
|
||||
#[cfg(any(
|
||||
target_os = "dragonfly",
|
||||
@@ -151,7 +142,7 @@ fn detect_bsd(_: &Target) -> Result<bool, Box<dyn Error>> {
|
||||
target_os = "openbsd",
|
||||
))]
|
||||
assert!(is_bsd, "Target incorrectly detected as not BSD!");
|
||||
Ok(is_bsd)
|
||||
is_bsd
|
||||
}
|
||||
|
||||
/// Rust sets the stack size of newly created threads to a sane value, but is at at the mercy of the
|
||||
@@ -160,13 +151,13 @@ fn detect_bsd(_: &Target) -> Result<bool, Box<dyn Error>> {
|
||||
///
|
||||
/// 0.5 MiB is small enough that we'd have to drastically reduce MAX_STACK_DEPTH to less than 10, so
|
||||
/// we instead use a workaround to increase the main thread size.
|
||||
fn has_small_stack(_: &Target) -> Result<bool, Box<dyn Error>> {
|
||||
fn has_small_stack(_: &Target) -> bool {
|
||||
#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "netbsd")))]
|
||||
return Ok(false);
|
||||
return false;
|
||||
|
||||
// NetBSD 10 also needs this but can't find pthread_get_stacksize_np.
|
||||
#[cfg(target_os = "netbsd")]
|
||||
return Ok(true);
|
||||
return true;
|
||||
|
||||
#[cfg(any(target_os = "ios", target_os = "macos"))]
|
||||
{
|
||||
@@ -182,8 +173,8 @@ fn has_small_stack(_: &Target) -> Result<bool, Box<dyn Error>> {
|
||||
let stack_size = unsafe { pthread_get_stacksize_np(pthread_self()) };
|
||||
const TWO_MIB: usize = 2 * 1024 * 1024 - 1;
|
||||
match stack_size {
|
||||
0..=TWO_MIB => Ok(true),
|
||||
_ => Ok(false),
|
||||
0..=TWO_MIB => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ begin
|
||||
echo ""
|
||||
end
|
||||
|
||||
set -g workspace_root (status dirname)/..
|
||||
set -g workspace_root (path resolve (status dirname)/..)
|
||||
|
||||
set -l rust_extraction_file
|
||||
if set -l --query _flag_use_existing_template
|
||||
@@ -31,6 +31,7 @@ begin
|
||||
or exit 1
|
||||
end
|
||||
|
||||
echo '# fish-section-tier1-from-rust'
|
||||
# Get rid of duplicates and sort.
|
||||
msguniq --no-wrap --strict --sort-output $rust_extraction_file
|
||||
or exit 1
|
||||
@@ -39,8 +40,9 @@ begin
|
||||
rm $rust_extraction_file
|
||||
end
|
||||
|
||||
function extract_fish_script_messages --argument-names regex
|
||||
|
||||
function extract_fish_script_messages_impl
|
||||
set -l regex $argv[1]
|
||||
set -e argv[1]
|
||||
# Using xgettext causes more trouble than it helps.
|
||||
# This is due to handling of escaping in fish differing from formats xgettext understands
|
||||
# (e.g. POSIX shell strings).
|
||||
@@ -59,24 +61,74 @@ begin
|
||||
# 5. Double quotes are escaped, such that they are not interpreted as the start or end of
|
||||
# a msgid.
|
||||
# 6. We transform the string into the format expected in a PO file.
|
||||
cat $share_dir/config.fish $share_dir/completions/*.fish $share_dir/functions/*.fish |
|
||||
cat $argv |
|
||||
string replace --filter --regex $regex '$1' |
|
||||
string unescape |
|
||||
sort -u |
|
||||
sed -E -e 's_\\\\_\\\\\\\\_g' -e 's_"_\\\\"_g' -e 's_^(.*)$_msgid "\1"\nmsgstr ""\n_'
|
||||
end
|
||||
|
||||
function extract_fish_script_messages
|
||||
set -l tier $argv[1]
|
||||
set -e argv[1]
|
||||
if not set -q argv[1]
|
||||
return
|
||||
end
|
||||
# This regex handles explicit requests to translate a message. These are more important to translate
|
||||
# than messages which should be implicitly translated.
|
||||
set -l explicit_regex '.*\( *_ (([\'"]).+?(?<!\\\\)\\2) *\).*'
|
||||
echo "# fish-section-$tier-from-script-explicitly-added"
|
||||
extract_fish_script_messages_impl $explicit_regex $argv
|
||||
|
||||
# This regex handles descriptions for `complete` and `function` statements. These messages are not
|
||||
# particularly important to translate. Hence the "implicit" label.
|
||||
set -l implicit_regex '^(?:\s|and |or )*(?:complete|function).*? (?:-d|--description) (([\'"]).+?(?<!\\\\)\\2).*'
|
||||
echo "# fish-section-$tier-from-script-implicitly-added"
|
||||
extract_fish_script_messages_impl $implicit_regex $argv
|
||||
end
|
||||
|
||||
set -g share_dir $workspace_root/share
|
||||
|
||||
# This regex handles explicit requests to translate a message. These are more important to translate
|
||||
# than messages which should be implicitly translated.
|
||||
set -l explicit_regex '.*\( *_ (([\'"]).+?(?<!\\\\)\\2) *\).*'
|
||||
extract_fish_script_messages $explicit_regex
|
||||
set -l tier1 $share_dir/config.fish
|
||||
set -l tier2
|
||||
set -l tier3
|
||||
|
||||
# This regex handles descriptions for `complete` and `function` statements. These messages are not
|
||||
# particularly important to translate. Hence the "implicit" label.
|
||||
set -l implicit_regex '^(?:\s|and |or )*(?:complete|function).*? (?:-d|--description) (([\'"]).+?(?<!\\\\)\\2).*'
|
||||
extract_fish_script_messages $implicit_regex
|
||||
for file in $share_dir/completions/*.fish $share_dir/functions/*.fish
|
||||
# set -l tier (string match -r '^# localization: .*' <$file)
|
||||
set -l tier (string replace -rf -m1 \
|
||||
'^# localization: (.*)$' '$1' <$file)
|
||||
if set -q tier[1]
|
||||
switch "$tier"
|
||||
case tier1 tier2 tier3
|
||||
set -a $tier $file
|
||||
case 'skip*'
|
||||
case '*'
|
||||
echo >&2 "$file:1 unexpected localization tier: $tier"
|
||||
exit 1
|
||||
end
|
||||
continue
|
||||
end
|
||||
set -l dirname (path basename (path dirname $file))
|
||||
set -l command_name (path basename --no-extension $file)
|
||||
if test $dirname = functions &&
|
||||
string match -q -- 'fish_*' $command_name
|
||||
set -a tier1 $file
|
||||
continue
|
||||
end
|
||||
if test $dirname != completions
|
||||
echo >&2 "$file:1 missing localization tier for function file"
|
||||
exit 1
|
||||
end
|
||||
if test -e $workspace_root/doc_src/cmds/$command_name.rst
|
||||
set -a tier1 $file
|
||||
else
|
||||
set -a tier3 $file
|
||||
end
|
||||
end
|
||||
|
||||
extract_fish_script_messages tier1 $tier1
|
||||
extract_fish_script_messages tier2 $tier2
|
||||
extract_fish_script_messages tier3 $tier3
|
||||
end |
|
||||
# At this point, all extracted strings have been written to stdout,
|
||||
# starting with the ones taken from the Rust sources,
|
||||
|
||||
@@ -53,14 +53,14 @@ previous_minor_version=${previous_version%.*}
|
||||
)
|
||||
fi
|
||||
|
||||
printf %s "$(awk <"$workspace_root/CHANGELOG.rst" '
|
||||
printf '%s\n' "$(awk <"$workspace_root/CHANGELOG.rst" '
|
||||
NR <= 2 || /^\.\. ignore / { next }
|
||||
/^===/ { exit }
|
||||
{ print }
|
||||
' | sed '$d')" |
|
||||
sed -e '$s/^----*$//' # Remove spurious transitions at the end of the document.
|
||||
|
||||
if [ "$minor_version" != "$previous_minor_version" ]; then
|
||||
if [ "$minor_version" != "$previous_minor_version" ]; then {
|
||||
JoinEscaped() {
|
||||
sed 's/\S/\\&/g' |
|
||||
awk '
|
||||
@@ -79,7 +79,7 @@ previous_minor_version=${previous_version%.*}
|
||||
echo
|
||||
printf "Welcome back our returning committers: "
|
||||
JoinEscaped <"$relnotes_tmp/committers-returning"
|
||||
fi
|
||||
} fi
|
||||
echo
|
||||
echo "---"
|
||||
echo
|
||||
|
||||
@@ -32,6 +32,7 @@ done
|
||||
|
||||
repo_root="$(dirname "$0")/.."
|
||||
fish_site=$repo_root/../fish-site
|
||||
fish_site_repo=git@github.com:$repository_owner/fish-site
|
||||
|
||||
for path in . "$fish_site"
|
||||
do
|
||||
@@ -42,6 +43,13 @@ do
|
||||
fi
|
||||
done
|
||||
|
||||
(
|
||||
cd "$fish_site"
|
||||
[ "$(git rev-parse HEAD)" = \
|
||||
"$(git ls-remote "$fish_site_repo" refs/heads/master |
|
||||
awk '{print $1}')" ]
|
||||
)
|
||||
|
||||
if git tag | grep -qxF "$version"; then
|
||||
echo >&2 "$0: tag $version already exists"
|
||||
exit 1
|
||||
@@ -136,7 +144,10 @@ rm -rf "$tmpdir"
|
||||
cd "$fish_site"
|
||||
make
|
||||
git add -u
|
||||
! git ls-files --others --exclude-standard | grep .
|
||||
git add docs
|
||||
if git ls-files --others --exclude-standard | grep .; then
|
||||
exit 1
|
||||
fi
|
||||
git commit --message="$(printf %s "\
|
||||
| Release $version (docs)
|
||||
|
|
||||
@@ -144,15 +155,21 @@ rm -rf "$tmpdir"
|
||||
" | sed 's,^\s*| \?,,')"
|
||||
)
|
||||
|
||||
# Approve macos-codesign
|
||||
# TODO what if current user can't approve?
|
||||
gh_pending_deployments() {
|
||||
gh_api_repo() {
|
||||
path=$1
|
||||
shift
|
||||
command gh api \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||
"/repos/$repository_owner/fish-shell/actions/runs/$run_id/pending_deployments" \
|
||||
"/repos/$repository_owner/fish-shell/$path" \
|
||||
"$@"
|
||||
}
|
||||
|
||||
# Approve macos-codesign
|
||||
# TODO what if current user can't approve?
|
||||
gh_pending_deployments() {
|
||||
gh_api_repo "actions/runs/$run_id/pending_deployments" "$@"
|
||||
}
|
||||
while {
|
||||
environment_id=$(gh_pending_deployments | jq .[].environment.id)
|
||||
[ -z "$environment_id" ]
|
||||
@@ -167,7 +184,7 @@ echo '
|
||||
"comment": "Approved via ./build_tools/release.sh"
|
||||
}
|
||||
' |
|
||||
gh_pending_deployments -XPOST --input=-
|
||||
gh_pending_deployments --method POST --input=-
|
||||
|
||||
# Await completion.
|
||||
gh run watch "$run_id"
|
||||
@@ -184,7 +201,10 @@ done
|
||||
cd "$fish_site"
|
||||
make new-release
|
||||
git add -u
|
||||
! git ls-files --others --exclude-standard | grep .
|
||||
git add docs
|
||||
if git ls-files --others --exclude-standard | grep .; then
|
||||
exit 1
|
||||
fi
|
||||
git commit --message="$(printf %s "\
|
||||
| Release $version (release list update)
|
||||
|
|
||||
@@ -192,12 +212,12 @@ done
|
||||
" | sed 's,^\s*| \?,,')"
|
||||
# This takes care to support remote names that are different from
|
||||
# fish-shell remote name. Also, support detached HEAD state.
|
||||
git push git@github.com:$repository_owner/fish-site HEAD:master
|
||||
git push "$fish_site_repo" HEAD:master
|
||||
)
|
||||
|
||||
if [ -n "$integration_branch" ]; then
|
||||
if [ -n "$integration_branch" ]; then {
|
||||
git push $remote "$version^{commit}":refs/heads/$integration_branch
|
||||
else
|
||||
} else {
|
||||
changelog=$(cat - CHANGELOG.rst <<EOF
|
||||
fish ?.?.? (released ???)
|
||||
=========================
|
||||
@@ -207,23 +227,27 @@ EOF
|
||||
printf %s\\n "$changelog" >CHANGELOG.rst
|
||||
CommitVersion ${version}-snapshot "start new cycle"
|
||||
git push $remote HEAD:master
|
||||
fi
|
||||
|
||||
# TODO This can currently require a TTY for editing and password
|
||||
# prompts.
|
||||
if [ "$repository_owner" = fish-shell ]; then {
|
||||
mail=$(mktemp)
|
||||
cat >$mail <<EOF
|
||||
From: $(git var GIT_AUTHOR_IDENT | sed 's/ [0-9]* +[0-9]*$//')
|
||||
Subject: fish $version released
|
||||
|
||||
See https://github.com/fish-shell/fish-shell/releases/tag/$version
|
||||
EOF
|
||||
git send-email --suppress-cc=all --confirm=always $mail \
|
||||
--to="fish-users Mailing List <fish-users@lists.sourceforge.net>"
|
||||
rm $mail
|
||||
} fi
|
||||
|
||||
milestone_number=$(
|
||||
gh_api_repo milestones?state=open |
|
||||
jq '.[] | select(.title == "fish '"$version"'") | .number'
|
||||
)
|
||||
gh_api_repo --method PATCH milestones/$milestone_number \
|
||||
--raw-field state=closed
|
||||
|
||||
next_patch_version=$(
|
||||
echo "$version" | awk -F. '
|
||||
NF == 3 && $3 ~ /[0-9]+/ {
|
||||
printf "%s.%s.%s", $1, $2, $3+1
|
||||
}
|
||||
'
|
||||
)
|
||||
if [ -n "$next_patch_version" ]; then
|
||||
gh_api_repo --method POST milestones \
|
||||
--raw-field title="fish $next_patch_version"
|
||||
fi
|
||||
|
||||
exit
|
||||
|
||||
}
|
||||
|
||||
@@ -99,15 +99,55 @@ if set -l --query _flag_dry_run
|
||||
cp -r $po_dir/* $tmpdir
|
||||
end
|
||||
|
||||
function merge_po_files --argument-names template_file po_file
|
||||
msgmerge --no-wrap --update --no-fuzzy-matching --backup=none --quiet \
|
||||
$po_file $template_file
|
||||
or cleanup_exit
|
||||
set -l new_po_file (mktemp) # TODO Remove on failure.
|
||||
and msgattrib --no-wrap --no-obsolete -o $new_po_file $po_file
|
||||
or cleanup_exit
|
||||
|
||||
begin
|
||||
echo "# fish-note-sections: Translations are divided into sections, each starting with a fish-section-* comment."
|
||||
echo "# fish-note-sections: The first few sections are more important."
|
||||
echo "# fish-note-sections: Ignore the tier3 sections unless you have a lot of time."
|
||||
sed -i '
|
||||
/^# fish-note-sections:/d;
|
||||
/^# fish-section-/d;
|
||||
' $new_po_file
|
||||
|
||||
set -l next_line 1
|
||||
set -l section
|
||||
awk <$template_file '
|
||||
/^# fish-section-\S*$/ {
|
||||
section = $0
|
||||
}
|
||||
section != "" && /^msgid ".+"$/ {
|
||||
print section
|
||||
print $0
|
||||
section = ""
|
||||
}
|
||||
' |
|
||||
while read -l section
|
||||
read -l msgid_line
|
||||
set -l line_number (grep -m1 -Fxn $msgid_line $new_po_file | string split :)[1]
|
||||
sed -n "$next_line,$(math $line_number - 1)"p $new_po_file
|
||||
echo $section
|
||||
set next_line $line_number
|
||||
# set section
|
||||
end
|
||||
sed -n "$next_line,\$"p $new_po_file
|
||||
end >$po_file
|
||||
rm $new_po_file
|
||||
end
|
||||
|
||||
for po_file in $po_files
|
||||
if set --query tmpdir[1]
|
||||
set po_file $tmpdir/(basename $po_file)
|
||||
end
|
||||
if set -l --query po
|
||||
if test -e $po_file
|
||||
msgmerge --no-wrap --update --no-fuzzy-matching --backup=none --quiet $po_file $template_file
|
||||
and msgattrib --no-wrap --no-obsolete -o $po_file $po_file
|
||||
or cleanup_exit
|
||||
merge_po_files $template_file $po_file
|
||||
else
|
||||
cp $template_file $po_file
|
||||
end
|
||||
|
||||
@@ -12,7 +12,7 @@ fn cargo_target_dir() -> Cow<'static, Path> {
|
||||
}
|
||||
|
||||
pub fn fish_build_dir() -> Cow<'static, Path> {
|
||||
// FISH_BUILD_DIR is set by CMake, if we are using it.
|
||||
// This is set if using CMake.
|
||||
option_env!("FISH_BUILD_DIR")
|
||||
.map(|d| Cow::Borrowed(Path::new(d)))
|
||||
.unwrap_or(cargo_target_dir())
|
||||
|
||||
@@ -72,7 +72,7 @@ Required Commands
|
||||
|
||||
``\e[0c``
|
||||
-
|
||||
- Request primary device attribute.
|
||||
- Request Primary Device Attribute.
|
||||
The terminal must respond with a CSI command that starts with the ``?`` parameter byte (so a sequence starting with ``\e[?``) and has ``c`` as final byte.
|
||||
|
||||
Failure to implement this will cause a brief pause at startup followed by a warning.
|
||||
|
||||
3830
po/pt_BR.po
3830
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
49670
po/zh_CN.po
49670
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
@@ -1 +1,2 @@
|
||||
# localization: tier1
|
||||
complete ! --wraps not
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
# localization: tier1
|
||||
complete [ --wraps test
|
||||
|
||||
@@ -11,7 +11,7 @@ complete -c commandline -s t -l current-token -d "Select token under cursor"
|
||||
complete -c commandline -s b -l current-buffer -d "Select entire command line (default)"
|
||||
|
||||
complete -c commandline -s c -l cut-at-cursor -d "Only return that part of the command line before the cursor"
|
||||
complete -c commandline -s f -l function -d "Inject readline functions to reader"
|
||||
complete -c commandline -s f -l function -d "execute readline function"
|
||||
complete -c commandline -s x -l tokens-expanded -d "Print a list of expanded tokens"
|
||||
|
||||
complete -c commandline -s I -l input -d "Specify command to operate on"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# localization: skip(barely-used)
|
||||
|
||||
set --local CONDITION '! __fish_seen_argument --short r --long required-val --short o --long optional-val'
|
||||
|
||||
complete --command fish_opt --no-files
|
||||
|
||||
@@ -122,7 +122,7 @@ complete -c help -x -a exporting-variables -d "What set -x does"
|
||||
complete -c help -x -a functions -d "How to define functions"
|
||||
complete -c help -x -a home-directory-expansion -d "~ expansion"
|
||||
complete -c help -x -a index-range-expansion -d "var[x..y] slices"
|
||||
complete -c help -x -a input-output-redirection -d "< and > redirectoins"
|
||||
complete -c help -x -a input-output-redirection -d "< and > redirections"
|
||||
complete -c help -x -a lists -d "Variables with multiple elements"
|
||||
complete -c help -x -a loops-and-blocks -d "while, for and begin"
|
||||
complete -c help -x -a more-on-universal-variables
|
||||
|
||||
@@ -47,7 +47,7 @@ complete -c scp -d "Local Path" -n "not string match @ -- (commandline -ct)"
|
||||
complete -c scp -d "Remote Path" -f -n "commandline -ct | string match -e ':'" -a '
|
||||
(__scp_remote_target):(
|
||||
if not set -q __fish_scp_sftp
|
||||
set -l tmp (__fish_mktemp fish-scp)
|
||||
set -l tmp (__fish_mktemp_relative fish-scp)
|
||||
if scp -P(__scp2ssh_port_number) -o "BatchMode yes" -q -O $tmp (__scp_remote_target):/dev/null
|
||||
set -g __fish_scp_sftp true
|
||||
else
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
function N_ --description No-op
|
||||
# localization: skip(deprecated)
|
||||
function N_
|
||||
printf "%s" $argv
|
||||
end
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
# returns 0 only if any argument is on of the supplied arguments
|
||||
function __fish_any_arg_in
|
||||
set -l haystack $argv
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
function __fish_anyeditor --description "Print a editor to use, or an error message"
|
||||
# localization: tier1
|
||||
function __fish_anyeditor
|
||||
set -l editor
|
||||
if set -q VISUAL
|
||||
echo $VISUAL | read -at editor
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_anypager --description "Print a pager to use"
|
||||
set -l pager
|
||||
# We prefer $PAGER if we have it
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_anypython
|
||||
# Try python3 first, because that's usually faster and generally nicer.
|
||||
# Do not consider the stub /usr/bin/python3 that comes installed on Darwin to be Python
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_append -d "Internal completion function for appending string to the commandline" --argument-names sep
|
||||
set -e argv[1]
|
||||
set -l str (commandline -tc | string replace -rf "(.*$sep)[^$sep]*" '$1' | string replace -r -- '--.*=' '')
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
if not type -q apropos
|
||||
function __fish_apropos
|
||||
end
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_argcomplete_complete
|
||||
set -lx _ARGCOMPLETE 1
|
||||
set -lx _ARGCOMPLETE_IFS \n
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_cache_put
|
||||
set -l cache_file $argv[1]
|
||||
touch $cache_file
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_cache_sourced_completions
|
||||
# Allow a `--name=foo` option which ends up in the filename.
|
||||
argparse -s name= -- $argv
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_cached --description "Cache the command output for a given amount of time"
|
||||
|
||||
argparse --min-args 1 --max-args 1 --stop-nonopt 't/max-age=!_validate_int --min 0' 'k/cache-key=' -- $argv
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
# This is meant to be bound to something like ctrl-c
|
||||
function __fish_cancel_commandline
|
||||
commandline -f cancel-commandline
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_change_key_bindings --argument-names bindings
|
||||
set -g __fish_active_key_bindings $bindings
|
||||
# Allow the user to set the variable universally
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
function __fish_cmd__complete_args -d 'Function to generate args'
|
||||
# localization: tier3
|
||||
function __fish_cmd__complete_args
|
||||
set -l current_token (commandline -tc)
|
||||
|
||||
switch $current_token
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
# TODO: This function is deprecated. It was used in fish_clipboard_paste
|
||||
# which some users copied, so maybe leave it around for a few years.
|
||||
function __fish_commandline_is_singlequoted --description "Return 0 if the current token has an open single-quote"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_complete_atool_archive_contents --description 'List archive contents'
|
||||
set -l cmd (commandline -cxp)
|
||||
set -e cmd[1]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# localization: tier3
|
||||
#
|
||||
# Bittorrent commands
|
||||
|
||||
function __fish_complete_bittorrent
|
||||
complete -c $argv -l max_uploads -x --description "Maximum uploads at once"
|
||||
complete -c $argv -l keepalive_interval -x --description "Number of seconds between keepalives"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# localization: skip(private)
|
||||
#
|
||||
# Helper function for completions that need to enumerate block devices.
|
||||
function __fish_complete_blockdevice
|
||||
set -l cmd (commandline -ct)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# localization: skip(private)
|
||||
#
|
||||
# This function only emits completions that might result from matches against $CDPATH. We rely on
|
||||
# the core file name completion logic to include all other possible matches.
|
||||
function __fish_complete_cd -d "Completions for the cd command"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# localization: skip(private)
|
||||
#
|
||||
# This function is compatible with clang, clang++, and variations thereof, and is shared
|
||||
# by clang.fish and clang++.fish.
|
||||
# We dynamically query the head at `(commandline -x)[1]` to get the correct completions.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_complete_command --description 'Complete using all available commands'
|
||||
set -l ctoken "$(commandline -ct)"
|
||||
switch $ctoken
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_complete_convert_options --description 'Complete Convert options' --argument-names what
|
||||
switch $what
|
||||
case format Format
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
#
|
||||
# Find directories that complete $argv[1], output them as completions
|
||||
# with description $argv[2] if defined, otherwise use 'Directory'.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
function __fish_complete_docutils -d "Completions for Docutils common options" -a cmd
|
||||
# localization: tier3
|
||||
function __fish_complete_docutils -a cmd
|
||||
complete -x -c $cmd -k -a "(__fish_complete_suffix .rst .txt)"
|
||||
|
||||
# General Docutils Options
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_complete_freedesktop_icons -d 'List installed icon names according to `https://specifications.freedesktop.org/icon-theme-spec/0.13/`'
|
||||
# The latest `icon-theme-spec` as of 2024-08-10 is 0.13
|
||||
# https://specifications.freedesktop.org/icon-theme-spec/latest/
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
function __fish_complete_ftp -d 'Complete ftp, pftp' --argument-names ftp
|
||||
# localization: tier3
|
||||
function __fish_complete_ftp --argument-names ftp
|
||||
# Common across all ftp implementations
|
||||
complete -c $ftp -xa "(__fish_print_hostnames)" -d Hostname
|
||||
complete -c $ftp -s 4 -d 'Use IPv4 only'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: tier3
|
||||
#
|
||||
# Completions for the gpg program.
|
||||
#
|
||||
@@ -15,7 +16,7 @@
|
||||
# removed. The remaining list of completions is still quite
|
||||
# impressive.
|
||||
|
||||
function __fish_complete_gpg -d "Internal function for gpg completion code deduplication" -a __fish_complete_gpg_command
|
||||
function __fish_complete_gpg -a __fish_complete_gpg_command
|
||||
if string match -q 'gpg (GnuPG) 1.*' ($__fish_complete_gpg_command --version 2>/dev/null)
|
||||
complete -c $__fish_complete_gpg_command -l simple-sk-checksum -d 'Integrity protect secret keys by using a SHA-1 checksum'
|
||||
complete -c $__fish_complete_gpg_command -l no-sig-create-check -d "Do not verify each signature right after creation"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# Helper function for contextual autocompletion of GPG key ids
|
||||
# localization: skip(private)
|
||||
|
||||
# Helper function for contextual autocompletion of GPG key ids
|
||||
function __fish_complete_gpg_key_id -d 'Complete using gpg key ids' -a __fish_complete_gpg_command list_arg
|
||||
# Use user id as description
|
||||
set -l keyid
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# Helper function for contextual autocompletion of gpg user ids
|
||||
# localization: skip(private)
|
||||
|
||||
# Helper function for contextual autocompletion of gpg user ids
|
||||
function __fish_complete_gpg_user_id -d "Complete using gpg user ids" -a __fish_complete_gpg_command list_arg
|
||||
# gpg doesn't seem to like it when you use the whole key name as a
|
||||
# completion, so we skip the <EMAIL> part and use it as a description.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_complete_group_ids --description "Complete group IDs with group name as description"
|
||||
if command -sq getent
|
||||
getent group | string replace -f -r '^([[:alpha:]_][^:]*):[^:]*:(\d+).*' '$2\t$1'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_complete_groups --description "Print a list of local groups, with group members as the description"
|
||||
if command -sq getent
|
||||
getent group | while read -l line
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_complete_job_pids --description "Print a list of job PIDs and their commands"
|
||||
if set -l jobpids (jobs -p)
|
||||
# when run at the commandline, the first line of output is a header, but
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_complete_list --argument-names div cmd prefix iprefix
|
||||
if not set -q cmd[1]
|
||||
echo "Usage:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: tier3
|
||||
function __fish_complete_lpr -d 'Complete lpr common options' --argument-names cmd
|
||||
complete -c $cmd -s E -d 'Forces encryption when connecting to the server'
|
||||
complete -c $cmd -s U -d 'Specifies an alternate username' -xa '(__fish_complete_users)'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_complete_lpr_option --description 'Complete lpr option'
|
||||
set -l optstr "$(commandline -t)"
|
||||
switch $optstr
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: tier3
|
||||
function __fish_complete_magick
|
||||
complete -c $argv -o adjoin -d 'Join images into a single multi-image file'
|
||||
complete -c $argv -o affine -d 'Affine transform matrix [matrix]'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_complete_man
|
||||
# Try to guess what section to search in. If we don't know, we
|
||||
# use [^)]*, which should match any section.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: tier3
|
||||
function __fish_print_user_ids
|
||||
if command -sq getent
|
||||
for line in (getent passwd)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: tier3
|
||||
function __fish_mysql_query -a query
|
||||
argparse -u 'u/user=' 'P/port=' 'h/host=' 'p/password=?' 'S/socket=' -- (commandline -px)
|
||||
set -l mysql_cmd mysql
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: tier3
|
||||
function __fish_complete_netcat
|
||||
set -l nc $argv[1]
|
||||
set -l flavor $argv[-1]
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_complete_path --description "Complete using path"
|
||||
set -l target
|
||||
set -l description
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_complete_pg_database
|
||||
psql -AtqwlXF \t 2>/dev/null | awk 'NF > 1 { print $1 }'
|
||||
end
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_complete_pg_user
|
||||
psql -AtqwXc 'select usename from pg_user' template1 2>/dev/null
|
||||
end
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: tier3
|
||||
function __fish_complete_pgrep -d 'Complete pgrep/pkill' --argument-names cmd
|
||||
complete -c $cmd -xa '(__fish_complete_proc)'
|
||||
complete -c $cmd -s f -d 'Match pattern against full command line'
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_complete_pids -d "Print a list of process identifiers along with brief descriptions"
|
||||
# This may be a bit slower, but it's nice - having the tty displayed is really handy
|
||||
# 'tail -n +2' deletes the first line, which contains the headers
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_complete_ppp_peer --description 'Complete isp name for pon/poff'
|
||||
find /etc/ppp/peers/ -type f -printf '%f\n'
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_complete_proc
|
||||
# "comm=" means "print comm field with an empty name", which causes the header to be removed.
|
||||
# On many systems, comm is truncated (e.g. on Linux it's 15 chars),
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: tier3
|
||||
function __fish_complete_ssh -d "common completions for ssh commands" --argument-names command
|
||||
complete -c $command -s 4 -d "IPv4 only"
|
||||
complete -c $command -s 6 -d "IPv6 only"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_complete_subcommand -d "Complete subcommand" --no-scope-shadowing
|
||||
# How many non-option tokens we skip in the input commandline before completing the subcommand
|
||||
# Usually 1; use "--fcs-skip=2" to make it 2 (see e.g. tmux and ssh completions)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# localization: skip(private)
|
||||
#
|
||||
# Find files ending in any of the non-switch arguments and output them as completions.
|
||||
# * --description provides the description that should be part of each generated completion,
|
||||
# * --prefix=DIR makes __fish_complete_suffix behave as if it were called in DIR rather than $PWD
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_complete_user_at_hosts -d "Print list host-names with user@"
|
||||
for user_at in (commandline -ct | string match -r '.*@'; or echo "")(__fish_print_hostnames)
|
||||
echo $user_at
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_complete_user_ids --description "Complete user IDs with user name as description"
|
||||
if command -sq getent
|
||||
getent passwd | string replace -f -r '^([[:alpha:]_][^:]*):[^:]*:(\d+).*' '$2\t$1'
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# localization: skip(private)
|
||||
#
|
||||
# This should be used where you want user names with a description. Such as in an argument
|
||||
# completion. If you just want a list of user names use __fish_print_users.
|
||||
# The string replace command takes into account GECOS-formatted description fields, by retaining
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# localization: tier3
|
||||
#
|
||||
# Helper functions for wireshark/tshark/dumpcap completion
|
||||
|
||||
function __fish_wireshark_choices
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
function __fish_complete_zfs_mountpoint_properties -d "Completes with ZFS mountpoint properties"
|
||||
# localization: tier3
|
||||
function __fish_complete_zfs_mountpoint_properties
|
||||
set -l OS ""
|
||||
switch (uname)
|
||||
case Linux
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_complete_zfs_pools -d "Completes with available ZFS pools"
|
||||
zpool list -o name,comment -H | string replace -a \t'-' ''
|
||||
end
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
function __fish_complete_zfs_ro_properties -d "Completes with ZFS read-only properties"
|
||||
# localization: tier3
|
||||
function __fish_complete_zfs_ro_properties
|
||||
echo -e "available\tAvailable space"
|
||||
echo -e "avail\tAvailable space"
|
||||
echo -e "compressratio\tAchieved compression ratio"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
function __fish_complete_zfs_rw_properties -d "Completes with ZFS read-write properties"
|
||||
# localization: tier3
|
||||
function __fish_complete_zfs_rw_properties
|
||||
set -l OS ""
|
||||
switch (uname)
|
||||
case Linux
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
function __fish_complete_zfs_write_once_properties -d "Completes with ZFS properties which can only be written at filesystem creation, and only be read thereafter"
|
||||
# localization: tier3
|
||||
function __fish_complete_zfs_write_once_properties
|
||||
set -l OS ""
|
||||
switch (uname)
|
||||
case Linux
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# localization: skip(private)
|
||||
#
|
||||
# This function is intended to be used to generate completions in `-a "(...)"` calls for arguments that take 1..n values
|
||||
# separated by commas and we dynamically or statically generated a list of n values that must be combined and permuted
|
||||
# in order to appease both the `complete` machinery and the target application.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
#
|
||||
# Initializations that should only be performed when entering interactive mode.
|
||||
#
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_contains_opt -d "Checks if a specific option has been given in the current commandline"
|
||||
set -l next_short
|
||||
set -l short_opt
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
# a function to obtain a list of installed packages with CRUX pkgutils
|
||||
function __fish_crux_packages -d 'Obtain a list of installed packages'
|
||||
pkginfo -i | string split -f1 ' '
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_cursor_konsole -d 'Set cursor (konsole)'
|
||||
set -l shape $argv[1]
|
||||
switch "$shape"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_cursor_xterm -d 'Set cursor (xterm)'
|
||||
set -l shape $argv[1]
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
#
|
||||
# This function is used internally by the fish command completion code
|
||||
#
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
set -l erase_line "$(
|
||||
if status test-feature ignore-terminfo
|
||||
echo \e\[K
|
||||
@@ -9,7 +10,8 @@ set -l erase_line "$(
|
||||
function __fish_echo --inherit-variable erase_line --description 'run the given command after the current commandline and redraw the prompt'
|
||||
set -l line (commandline --line)
|
||||
string >&2 repeat -N \n --count=(math (commandline | count) - $line + 1)
|
||||
printf %s\n $erase_line($argv) >&2
|
||||
printf %s $erase_line >&2
|
||||
$argv >&2
|
||||
string >&2 repeat -N \n --count=(math (count (fish_prompt)) - 1)
|
||||
string >&2 repeat -N \n --count=(math $line - 1)
|
||||
commandline -f repaint
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: tier1
|
||||
function __fish_edit_command_if_at_cursor --description 'If cursor is at the command token, edit the command source file'
|
||||
set -l tokens (commandline -xpc)
|
||||
set -l command
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
# Retrieves the first non-switch argument from the command line buffer
|
||||
function __fish_first_token
|
||||
set -l tokens (commandline -cx)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(deprecated)
|
||||
function __fish_git_prompt
|
||||
# TODO: This name is deprecated, figure out a way to tell users.
|
||||
fish_git_prompt $argv
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_gnu_complete -d "Wrapper for the complete built-in. Skips the long completions on non-GNU systems"
|
||||
set -l is_gnu 0
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(deprecated)
|
||||
function __fish_hg_prompt
|
||||
fish_hg_prompt
|
||||
end
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
set -l dir "$(path dirname -- (status fish-path 2>/dev/null))"
|
||||
|
||||
if command -v $dir/fish_indent >/dev/null
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
# determine if this is the very first argument (regardless if switch or not)
|
||||
function __fish_is_first_arg
|
||||
set -l tokens (commandline -pxc)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# localization: skip(private)
|
||||
function __fish_is_first_token -d 'Test if no non-switch argument has been specified yet'
|
||||
__fish_is_nth_token 1
|
||||
end
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user