On 10 Feb 2019, at 13:27, Christopher Stone <[email protected]> wrote: > On 02/10/2019, at 08:48, @lbutlr <[email protected]> wrote: >>> These work, but they change the working directory. >> >> Yes, I thought that was what you wanted. >> >>> The whole purpose of my request was to provide a means of opening the >>> worksheet to a specific directory without changing the working directory. >> >> Um, Ok, what? They change the working directory *for BBEdit*. > > Hey Lewis, > > Eh? You're right. (I thought I tested better than that...) > > Okay, please educate me. > > Why does the parenthetic isolation of the command NOT change the working > directory of the shell?
Mr Jones explained that well, so I won't repeat anything. $(command) came along with the POSIX standard and is the same as `command` in bash, though the former is favored over the latter (for good reason, but those reasons are not important to most people. Here is an example of why most people favor the POSIX standard. `cd /some/directory; ls -ls \`grep -l "foo bar"\` ` $(cd so,e/directory; ls -ls $(grep -l "foo bar")) The second version is much more readable and obvious as to what is going on, and the backpacks quickly get out of hand as you spawn more sub shells. > If you remove the parentheses the shell's working directory is changed. Yes. >> ls -l ~/Downloads | bbedit -s >> >> will dump the list of files in ~/Downloads into bbedit and not change >> directory. > > You mean of the shell? It will not change directory of the shell you are in, nor of the shell worksheet BBEdit launches. > Quite right. > >>> For that matter bbedit -s does NOT work unless text is piped to it. >> >> bbedit -s . >> >> When the BBEdit man page says "the specified files" for a flag, it means >> that a file is required. (FSVO of the word file) > > Oh? > > Try: > > bbedit -s 'What file is required?' Yes? Works exactly as I expect and as the man page says; what are you expecting to happen with that command? -s, --worksheet Create a new shell worksheet file with the specified name, unless such a file exists already, in which case it will be opened. -- "Reality continues to ruin my life." -- This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "[email protected]" rather than posting to the group. Follow @bbedit on Twitter: <https://www.twitter.com/bbedit> --- You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/bbedit.
