[Abcde-users] [PATCH] Replace Sub-shell Parenthesis with Curly Braces and Indent
Roger
rogerx.oss at gmail.com
Wed Mar 25 15:03:34 GMT 2015
Here's the complete patch what I discussed within the previous thread.
1) Replaced the parenthesis within four piped script/code block sections and
instead use curly braces or curly brackets. Hence, variables should now be
preserved within and after the piped sections are called. (ie. Sub-shells
variables are lost, as the shell called using parenthesis is a separately
executed shell and might close an old bug here.) Doing this also inherently
increased readability, due to VIM syntax highlighting not working well with or
broke the highlighting when encountering the larger sub-shell parenthesis
script/code block sections.
2) Indented the four script/code block sections for readability. As noted, all
other functions are indented as well now.
As previously mentioned within the previous thread, the curly brace usage may
introduce new bugs as it's questionable whether the original knew he was
creating sub-shells, hence loosing variable definitions on reiteration or when
executing outside the sub-shells. In essence, we now desire to have and use
these variable definitions for our pre and post processing custom user
functions. At this point though, I would somewhat presume the original author
didn't know he/she were loosing variable definitions and coded these blocks as
if the variable definitions were still preserved, and unknowingly loosing the
variable definitions.
I have tested extracting (Essential Mozart Audio CD 1) to PCM WAV and further
encoding to Vorbis, using my previously cached CDDB meta data. So things
should just work fine, unless there's shared/conflicting variable names within
the other functions (ie. or other encoders) or I overlooked an error within the
standard output logging.
--
Roger
http://rogerx.freeshell.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: abcde-usecurlybraces-indent.patch
Type: text/x-diff
Size: 30393 bytes
Desc: not available
URL: <http://lists.einval.com/pipermail/abcde-users/attachments/20150325/b3f453e8/attachment-0001.patch>
More information about the Abcde-users
mailing list