Would it be possible/reasonable to provide another action equivalent to "run this command the same way as if I'd typed it into Terminal using my default shell"? I know about the "right" behaviour, but sometimes I just want to be able to run a command (or create a trigger) without creating a bunch of wrappers to be able to use the commands I'm used to.
After some poking around on the internet, it seems the way to get a user's default shell is through DirectoryServices: dscl . -read "/Users/$(whoami)" UserShell »Lucas Garron On Thu, Apr 4, 2013 at 7:38 AM, 1.61803 <[email protected]> wrote: > On Tuesday, April 2, 2013 8:28:24 PM UTC+2, Jon Stovell wrote: >> >> Quicksilver is just being a good OS X citizen and following the rules for >> running non-interactive shells by using /bin/sh. > > > I would make explicit this behaviour in the plugin's documentation. I > thought QS was sending the command interactively in the background to > $SHELL. > > For example, if you open an AppleScript and run do shell script "echo $0", >> you'll note that AppleScript also uses sh, and that if you try to use a >> bash alias in an AppleScript, that will fail, too. > > > Not if you add -li options as below. Also, AppleScript logs the error — QS > just logs 'Task failed'. Am I missing something? > > >> Probably your best bet, 1.61803, is to follow the advice I gave another >> user here: >> https://github.com/**quicksilver/Quicksilver/**issues/1164<https://github.com/quicksilver/Quicksilver/issues/1164> >> > > Thanks Jon for the script. I can use it with login and interactive options > added to work properly. > > *using terms from* *application* "Quıcĸsıɩⅴεʀ" > > *on* *process text* theCommand > > *do shell script* "/bin/bash -lic " & quoted form *of* theCommand > > *end* *process text* > > *end* *using terms from* > > I know it's not the appropriate forum for this — but just in case anyone > stumbles on something similar in QS, this is what I found/tried/done > > - bash interactive > source /path/to/myAliasesFile in /private/etc/profile > > - bash non-interactive (doesn't work) > export BASH_ENV=/path/to/myAliasesFile in /private/etc/private and shopt > -s expand_aliases in myAliasesFile > > - sh interactive > export ENV=/path/to/myAliasesFile in /private/etc/profile > > - sh non-interactive > 'A non-interactive shell invoked with the name sh does not attempt to read > any other startup files.' bash man page > invocation > > -- > 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. > > > -- 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.
