mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-27 16:51:15 -03:00
@@ -1297,14 +1297,14 @@ To customize the syntax highlighting, you can set the environment variables list
|
||||
|
||||
\subsection title Programmable title
|
||||
|
||||
When using most virtual terminals, it is possible to set the message displayed in the titlebar of the terminal window. This can be done automatically in fish by defining the `fish_title` function. 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 $_ environment variable will always contain the name of the job to be put into the foreground (Or 'fish' if control is returning to the shell) when the `fish_prompt` function is called. The first argument to fish_title will contain the most recently executed foreground command as a string, starting with fish 2.2.
|
||||
When using most virtual terminals, it is possible to set the message displayed in the titlebar of the terminal window. This can be done automatically in fish by defining the `fish_title` function. 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 `status current-command` builtin will always return the name of the job to be put into the foreground (or 'fish' if control is returning to the shell) when the `fish_prompt` function is called. The first argument to fish_title will contain the most recently executed foreground command as a string, starting with fish 2.2.
|
||||
|
||||
Examples:
|
||||
The default `fish` title is
|
||||
|
||||
\fish
|
||||
function fish_title
|
||||
echo $_ ' '
|
||||
echo (status current-command) ' '
|
||||
pwd
|
||||
end
|
||||
\endfish
|
||||
|
||||
Reference in New Issue
Block a user