fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
867946468
master
1# Define the default debugging prompt command. 2function fish_breakpoint_prompt --description"A right prompt to be used when `breakpoint` is executed" 3set -l saved_status$status 4set -l function( status -L0 function) 5set -l line( status -L0 line-number) 6# At the moment we don't include the filename because, even if we truncate it, it makes the 7# prompt too long. 8#set -l filename (status filename) 9#set -l prompt "$filename:$function:$line >" 10set -l prompt" $function : $line " 11if test $saved_status -ne 0 12set prompt" $prompt [! $saved_status ]" 13end 14set prompt" $prompt > " 15 16# Make sure the prompt doesn't consume more than half the terminal width. 17set -l max_len( math " $COLUMNS / 2" ) 18if test ( string length --$prompt ) -gt $max_len 19set prompt ...( string sub -s -( math $max_len -3 ) --$prompt ) 20end 21 22echo -ns( set_color $fish_color_status ) "BP $prompt " ( set_color --reset) ' ' 23end