From 59b6046684dd405f60d2a164b93ba9c50f5e80c4 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Tue, 23 Aug 2016 20:33:49 +1200 Subject: Fully expand FUNCNAME --- bash/bashrc.d/prompt.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bash/bashrc.d/prompt.bash') diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash index ff8e4727..1a7a1c6f 100644 --- a/bash/bashrc.d/prompt.bash +++ b/bash/bashrc.d/prompt.bash @@ -81,7 +81,7 @@ prompt() { PS1='\['"$format"'\]'"$PS1"'\['"$reset"'\] ' PS2='> ' PS3='? ' - PS4='+<$?> ${BASH_SOURCE:-$BASH}:$FUNCNAME:$LINENO:' + PS4='+<$?> ${BASH_SOURCE:-$BASH}:${FUNCNAME[0]}:$LINENO:' ;; # Revert to simple inexpensive prompts @@ -226,7 +226,7 @@ prompt() { # Print error *) - printf '%s: Unknown command %s\n' "$FUNCNAME" "$1" >&2 + printf '%s: Unknown command %s\n' "${FUNCNAME[0]}" "$1" >&2 return 2 ;; esac -- cgit v1.2.3