In OS X, the sh executable is really bash, but bash run in a special mode
by calling it as sh.
The reason none of your bash aliases work, 1.61803, is explained in this
section from the bash man page:
If bash is invoked with the name sh, it tries to mimic the
startup
behavior of historical versions of sh as closely as possible,
while
conforming to the POSIX standard as well. When invoked as an
interac-
tive login shell, or a non-interactive shell with the --login
option,
it first attempts to read and execute commands from /etc/profile
and
~/.profile, in that order. The --noprofile option may be used
to
inhibit this behavior. When invoked as an interactive shell with
the
name sh, bash looks for the variable ENV, expands its value if it
is
defined, and uses the expanded value as the name of a file to read
and
execute. Since a shell invoked as sh does not attempt to read and
exe-
cute commands from any other startup files, the --rcfile option has
no
effect. A non-interactive shell invoked with the name sh does
not
attempt to read any other startup files. When invoked as sh,
bash
enters posix mode after the startup files are read.
In other words, Quicksilver is doing exactly what it is supposed to do by
calling /bin/sh to run shell scripts, and /bin/sh is doing exactly what it
is supposed to do when it ignores whatever you have in ~/.bash_profile,
~/.bash_login, and ~/.profile.
If you want the functions that you have put into your bash aliases to be
available via Quicksilver, turn them into executable bash scripts and save
them somewhere on your PATH (e.g. /usr/local/bin). Then you'll be able to
call them no matter how you invoke a shell.
On Monday, April 1, 2013 10:54:26 AM UTC-4, 1.61803 wrote:
>
> On Monday, April 1, 2013 4:20:54 PM UTC+2, Rob McBroom wrote:
>>
>> In Terminal, run `exec /bin/sh`.
>> Do any of those commands work there?
>
>
> Non-default commands run in sh, aliases don't.
> Non-default commands won't run with Run Command in Shell.
>
>
>> I seem to remember hearing long ago that `sh` was just `bash` on OS X.
>>
>
> I remember at stackoverflow someone mentioned that in some systems sh is
> bash.
>
> What does actually Run Command in Shell do? From what I mentioned above
> it's rather confusing.
>
> Is it counterintuitive to think that whatever I write in the first panel
> be passed to the default shell?
>
--
You received this message because you are subscribed to the Google Groups
"Quicksilver" 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 http://groups.google.com/group/blacktree-quicksilver?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.