mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-01 04:41:14 -03:00
builtin status: rename buildinfo to build-info
See: https://github.com/fish-shell/fish-shell/pull/11726#discussion_r2347389523
This commit is contained in:
@@ -475,7 +475,7 @@ Improved terminal support
|
|||||||
|
|
||||||
Other improvements
|
Other improvements
|
||||||
------------------
|
------------------
|
||||||
- ``status`` gained a ``buildinfo`` subcommand, to print information on how fish was built, to help with debugging (:issue:`10896`).
|
- ``status`` gained a ``build-info`` subcommand, to print information on how fish was built, to help with debugging (:issue:`10896`).
|
||||||
- ``fish_indent`` will now collapse multiple empty lines into one (:issue:`10325`).
|
- ``fish_indent`` will now collapse multiple empty lines into one (:issue:`10325`).
|
||||||
- ``fish_indent`` now preserves the modification time of files if there were no changes (:issue:`10624`).
|
- ``fish_indent`` now preserves the modification time of files if there were no changes (:issue:`10624`).
|
||||||
- Performance in launching external processes has been improved for many cases (:issue:`10869`).
|
- Performance in launching external processes has been improved for many cases (:issue:`10869`).
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ Synopsis
|
|||||||
status job-control CONTROL_TYPE
|
status job-control CONTROL_TYPE
|
||||||
status features
|
status features
|
||||||
status test-feature FEATURE
|
status test-feature FEATURE
|
||||||
status buildinfo
|
status build-info
|
||||||
status get-file FILE
|
status get-file FILE
|
||||||
status list-files [PATH]
|
status list-files [PATH]
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ The following operations (subcommands) are available:
|
|||||||
**test-feature** *FEATURE*
|
**test-feature** *FEATURE*
|
||||||
Returns 0 when FEATURE is enabled, 1 if it is disabled, and 2 if it is not recognized.
|
Returns 0 when FEATURE is enabled, 1 if it is disabled, and 2 if it is not recognized.
|
||||||
|
|
||||||
**buildinfo**
|
**build-info**
|
||||||
This prints information on how fish was build - which architecture, which build system or profile was used, etc.
|
This prints information on how fish was build - which architecture, which build system or profile was used, etc.
|
||||||
This is mainly useful for debugging.
|
This is mainly useful for debugging.
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Note that when a completion file is sourced a new block scope is created so `set -l` works.
|
# Note that when a completion file is sourced a new block scope is created so `set -l` works.
|
||||||
set -l __fish_status_all_commands \
|
set -l __fish_status_all_commands \
|
||||||
basename \
|
basename \
|
||||||
buildinfo \
|
build-info \
|
||||||
current-command \
|
current-command \
|
||||||
current-commandline \
|
current-commandline \
|
||||||
current-filename \
|
current-filename \
|
||||||
@@ -44,7 +44,7 @@ complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_com
|
|||||||
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a is-full-job-control -d "Test if all new jobs are put under job control"
|
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a is-full-job-control -d "Test if all new jobs are put under job control"
|
||||||
|
|
||||||
# The subcommands that are not "is-something" which don't change the fish state.
|
# The subcommands that are not "is-something" which don't change the fish state.
|
||||||
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a buildinfo -d "Print information on how this version fish was built"
|
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a build-info -d "Print information on how this version fish was built"
|
||||||
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a current-command -d "Print the name of the currently running command or function"
|
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a current-command -d "Print the name of the currently running command or function"
|
||||||
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a current-commandline -d "Print the currently running command with its arguments"
|
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a current-commandline -d "Print the currently running command with its arguments"
|
||||||
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a current-filename -d "Print the filename of the currently running script"
|
complete -f -c status -n "not __fish_seen_subcommand_from $__fish_status_all_commands" -a current-filename -d "Print the filename of the currently running script"
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ enum StatusCmd {
|
|||||||
STATUS_STACK_TRACE,
|
STATUS_STACK_TRACE,
|
||||||
STATUS_TEST_FEATURE,
|
STATUS_TEST_FEATURE,
|
||||||
STATUS_CURRENT_COMMANDLINE,
|
STATUS_CURRENT_COMMANDLINE,
|
||||||
|
STATUS_BUILD_INFO,
|
||||||
STATUS_BUILDINFO,
|
STATUS_BUILDINFO,
|
||||||
STATUS_GET_FILE,
|
STATUS_GET_FILE,
|
||||||
STATUS_LIST_FILES,
|
STATUS_LIST_FILES,
|
||||||
@@ -68,6 +69,7 @@ enum StatusCmd {
|
|||||||
StatusCmd,
|
StatusCmd,
|
||||||
(STATUS_BASENAME, "basename"),
|
(STATUS_BASENAME, "basename"),
|
||||||
(STATUS_BASENAME, "current-basename"),
|
(STATUS_BASENAME, "current-basename"),
|
||||||
|
(STATUS_BUILD_INFO, "build-info"),
|
||||||
(STATUS_BUILDINFO, "buildinfo"),
|
(STATUS_BUILDINFO, "buildinfo"),
|
||||||
(STATUS_CURRENT_CMD, "current-command"),
|
(STATUS_CURRENT_CMD, "current-command"),
|
||||||
(STATUS_CURRENT_COMMANDLINE, "current-commandline"),
|
(STATUS_CURRENT_COMMANDLINE, "current-commandline"),
|
||||||
@@ -546,7 +548,7 @@ pub fn status(parser: &Parser, streams: &mut IoStreams, args: &mut [&wstr]) -> B
|
|||||||
return Err(STATUS_INVALID_ARGS);
|
return Err(STATUS_INVALID_ARGS);
|
||||||
}
|
}
|
||||||
match s {
|
match s {
|
||||||
STATUS_BUILDINFO => {
|
STATUS_BUILD_INFO | STATUS_BUILDINFO => {
|
||||||
let version = str2wcstring(crate::BUILD_VERSION.as_bytes());
|
let version = str2wcstring(crate::BUILD_VERSION.as_bytes());
|
||||||
let target = str2wcstring(env!("BUILD_TARGET_TRIPLE").as_bytes());
|
let target = str2wcstring(env!("BUILD_TARGET_TRIPLE").as_bytes());
|
||||||
let host = str2wcstring(env!("BUILD_HOST_TRIPLE").as_bytes());
|
let host = str2wcstring(env!("BUILD_HOST_TRIPLE").as_bytes());
|
||||||
|
|||||||
@@ -6,10 +6,13 @@
|
|||||||
# Profile: release
|
# Profile: release
|
||||||
# Features: gettext
|
# Features: gettext
|
||||||
|
|
||||||
status buildinfo | grep -v 'Host:'
|
status build-info | grep -v 'Host:'
|
||||||
# CHECK: Build system: {{CMake|Cargo}}
|
# CHECK: Build system: {{CMake|Cargo}}
|
||||||
# CHECK: Version: {{.+}}
|
# CHECK: Version: {{.+}}
|
||||||
# (this could be "Target (and Host)" or "Target:" and a separate line "Host:")
|
# (this could be "Target (and Host)" or "Target:" and a separate line "Host:")
|
||||||
# CHECK: Target{{.*}}: {{.+}}
|
# CHECK: Target{{.*}}: {{.+}}
|
||||||
# CHECK: Profile: {{release|debug}}
|
# CHECK: Profile: {{release|debug}}
|
||||||
# CHECK: Features:{{.*}}
|
# CHECK: Features:{{.*}}
|
||||||
|
|
||||||
|
test "$(status build-info)" = "$(status buildinfo)"
|
||||||
|
or echo 'missing backwards-compatible version?'
|
||||||
Reference in New Issue
Block a user