1
0
Fork 0
mirror of https://github.com/Phantop/dotfiles synced 2024-11-13 02:12:44 +00:00
dotfiles/.config/fish/fisher/functions/fish_title.fish

17 lines
571 B
Fish

function fish_title \
--description "Set title to current folder and shell name" \
--argument-names last_command
set --local basename (string replace -r '^.*/' '' -- $PWD)
set --local current_folder (_pure_parse_directory)
set --local current_command (status current-command 2>/dev/null; or echo $_)
set --local prompt "$basename: $last_command $pure_symbol_title_bar_separator $current_command"
if test -z "$last_command"
set prompt "$current_folder $pure_symbol_title_bar_separator $current_command"
end
echo $prompt
end