0

I currently have the Terminal in my dock. I'd like to have another Terminal shortcut in the dock but with this one it will run a bash script which will do some stuff specific to that shortcut.

No, I cannot use .bash_profile since the original Terminal short cut will source that too.

This is pretty trivial to do in Windows, is it trivial on a Mac also?

1 Answers1

0

You can have files in the Dock, but they have to be the other side of the 'dividing line' from apps.

So a shell script file, with suffix .command, or .tool, could be in the Dock and would launch on a click.

There are other places to have scripts readily accessible in the Mac workspace, of course, such as the Scripts menulet.

benwiggy
  • 35,635
  • What I want basically is to open a terminal window that has sourced a bunch of files. Basically .bash_profile but specific for this terminal shell session. – Karl Morrison Apr 08 '21 at 13:11
  • Ok thanks, it's working now, made a command script, added to the dock, ran my stuff and then sourced .bash_profile then ran bash. Working as intended, ta. – Karl Morrison Apr 08 '21 at 13:34
  • Instead of sourcing .bash_profile I added https://apple.stackexchange.com/a/357362/123669 to the .bashrc file. – Karl Morrison Apr 08 '21 at 13:47