mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-22 13:57:17 +08:00
Rename variable to fish_killring
This commit is contained in:
parent
da97daa800
commit
9d66ddc840
|
@ -38,7 +38,7 @@ Interactive improvements
|
|||
- ``funced`` won't include an entry on where a function is defined, thanks to the new ``functions --no-details`` option (:issue:`7879`).
|
||||
- The git prompt now has the same symbol order in normal and "informative" mode, and it's customizable via ``$__fish_git_prompt_status_order`` (:issue:`7926`).
|
||||
- The git prompt now shows staged state in non-informative mode even when not told to show "dirty" files.
|
||||
- Variable ``killring`` containing entries from killring is now available (:issue:`7445`).
|
||||
- Variable ``fish_killring`` containing entries from killring is now available (:issue:`7445`).
|
||||
|
||||
New or improved bindings
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -397,7 +397,7 @@ Fish uses an Emacs-style kill ring for copy and paste functionality. For example
|
|||
|
||||
Copy and paste from outside are also supported, both via the :kbd:`Control`\ +\ :kbd:`X` / :kbd:`Control`\ +\ :kbd:`V` bindings (the ``fish_clipboard_copy`` and ``fish_clipboard_paste`` functions [#]_) and via the terminal's paste function, for which fish enables "Bracketed Paste Mode", so it can tell a paste from manually entered text.
|
||||
In addition, when pasting inside single quotes, pasted single quotes and backslashes are automatically escaped so that the result can be used as a single token simply by closing the quote after.
|
||||
Kill ring entries are stored in ``killring`` variable.
|
||||
Kill ring entries are stored in ``fish_killring`` variable.
|
||||
|
||||
.. [#] These rely on external tools. Currently xsel, xclip, wl-copy/wl-paste and pbcopy/pbpaste are supported.
|
||||
|
||||
|
|
|
@ -1262,7 +1262,7 @@ Fish also provides additional information through the values of certain environm
|
|||
|
||||
- ``version``, the version of the currently running fish (also available as ``FISH_VERSION`` for backward compatibility).
|
||||
|
||||
- ``killring``, list of entries in fish kill ring.
|
||||
- ``fish_killring``, list of entries in fish kill ring.
|
||||
|
||||
As a convention, an uppercase name is usually used for exported variables, while lowercase variables are not exported. (``CMD_DURATION`` is an exception for historical reasons). This rule is not enforced by fish, but it is good coding practice to use casing to distinguish between exported and unexported variables.
|
||||
|
||||
|
|
|
@ -91,10 +91,10 @@ static constexpr const electric_var_t electric_variables[] = {
|
|||
{L"SHLVL", electric_var_t::freadonly | electric_var_t::fexports},
|
||||
{L"_", electric_var_t::freadonly},
|
||||
{L"fish_kill_signal", electric_var_t::freadonly | electric_var_t::fcomputed},
|
||||
{L"fish_killring", electric_var_t::freadonly | electric_var_t::fcomputed},
|
||||
{L"fish_pid", electric_var_t::freadonly},
|
||||
{L"history", electric_var_t::freadonly | electric_var_t::fcomputed},
|
||||
{L"hostname", electric_var_t::freadonly},
|
||||
{L"killring", electric_var_t::freadonly | electric_var_t::fcomputed},
|
||||
{L"pipestatus", electric_var_t::freadonly | electric_var_t::fcomputed},
|
||||
{L"status", electric_var_t::freadonly | electric_var_t::fcomputed},
|
||||
{L"status_generation", electric_var_t::freadonly | electric_var_t::fcomputed},
|
||||
|
@ -718,8 +718,8 @@ maybe_t<env_var_t> env_scoped_impl_t::try_get_computed(const wcstring &key) cons
|
|||
wcstring_list_t result;
|
||||
if (history) history->get_history(result);
|
||||
return env_var_t(L"history", std::move(result));
|
||||
} else if (key == L"killring") {
|
||||
return env_var_t(L"killring", kill_entries());
|
||||
} else if (key == L"fish_killring") {
|
||||
return env_var_t(L"fish_killring", kill_entries());
|
||||
} else if (key == L"pipestatus") {
|
||||
const auto &js = perproc_data().statuses;
|
||||
wcstring_list_t result;
|
||||
|
|
Loading…
Reference in New Issue
Block a user