mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 13:53:10 +00:00
af61ea1325
We are using only :: in a synopsis for fishscript examples given of the command being documented.
42 lines
805 B
ReStructuredText
42 lines
805 B
ReStructuredText
.. _cmd-fish_title:
|
|
|
|
fish_title - define the terminal's title
|
|
========================================
|
|
|
|
Synopsis
|
|
--------
|
|
|
|
``fish_title``
|
|
::
|
|
|
|
function fish_title
|
|
...
|
|
end
|
|
|
|
|
|
Description
|
|
-----------
|
|
|
|
The ``fish_title`` function is executed before and after a new command is executed or put into the foreground and the output is used as a titlebar message.
|
|
|
|
The first argument to fish_title contains the most recently executed foreground command as a string, if any.
|
|
|
|
This requires that your terminal supports programmable titles and the feature is turned on.
|
|
|
|
|
|
Example
|
|
-------
|
|
|
|
A simple title:
|
|
|
|
|
|
|
|
::
|
|
|
|
function fish_title
|
|
set -q argv[1]; or set argv fish
|
|
# Looks like ~/d/fish: git log
|
|
# or /e/apt: fish
|
|
echo (fish_prompt_pwd_dir_length=1 prompt_pwd): $argv;
|
|
end
|
|
|