[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug: Bash forgets sourcefile and linenumber of read-in functions
From: |
Greg Wooledge |
Subject: |
Re: Bug: Bash forgets sourcefile and linenumber of read-in functions |
Date: |
Mon, 11 Mar 2019 16:34:03 -0400 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Mon, Mar 11, 2019 at 01:15:16PM -0700, L A Walsh wrote:
> 1) Where is it documented that if you export a function, the original
> source location is thrown away by bash?
It's not documented so much as blatantly obvious by looking at how it's
implemented.
wooledg:~$ export -f title
wooledg:~$ env | grep -A2 title
BASH_FUNC_title%%=() { local IFS=' ';
printf '\e]2;%s\a' "$*"
}
There's nowhere in that variable to store metadata such as original source
file or line number. You'd need a second variable at the very least.
It would require a modification of the function export/import code, and
this would break compatibility *again* (just like the shellshock patches
did when they changed the implementation).
- Bug: Bash forgets sourcefile and linenumber of read-in functions, L A Walsh, 2019/03/03
- Re: Bug: Bash forgets sourcefile and linenumber of read-in functions, Chet Ramey, 2019/03/04
- Re: Bug: Bash forgets sourcefile and linenumber of read-in functions, L A Walsh, 2019/03/04
- Re: Bug: Bash forgets sourcefile and linenumber of read-in functions, Chet Ramey, 2019/03/04
- Re: Bug: Bash forgets sourcefile and linenumber of read-in functions, L A Walsh, 2019/03/05
- Re: Bug: Bash forgets sourcefile and linenumber of read-in functions, Chet Ramey, 2019/03/06
- Re: Bug: Bash forgets sourcefile and linenumber of read-in functions, L A Walsh, 2019/03/11
- Re: Bug: Bash forgets sourcefile and linenumber of read-in functions,
Greg Wooledge <=
- Re: Bug: Bash forgets sourcefile and linenumber of read-in functions, L A Walsh, 2019/03/11
- Re: Bug: Bash forgets sourcefile and linenumber of read-in functions, Greg Wooledge, 2019/03/12
- Re: Bug: Bash forgets sourcefile and linenumber of read-in functions, Chet Ramey, 2019/03/11
Re: Bug: Bash forgets sourcefile and linenumber of read-in functions, Grisha Levit, 2019/03/04