On Mon, Mar 27, 2017 at 8:32 AM, Torka Noda <kanito.tas...@gmail.com> wrote:
> For any particular reason? > > Why are they not all made available anyway? with an alternative > array for the arguments sent to the commands fed to Bash stdin > with "-s", so we don't have to handle all possible arguments if > we just want the non-option arguments. > > > There definitely are other relatively clean ways (`env` and > '--rcfile', most notably), but using `bash -s foo bar` and > handling the positional parameters from ~/.bashrc, would be the > cleanest for small per-shell customizations (although it sure is > not what '-s' is meant to be used for). > > > Examples of people trying stuffs related to this: > > "Open gnome terminal programmatically and execute commands > after bashrc was executed": > https://superuser.com/questions/198015 > > "Open gnome terminal programmatically and execute commands > after bashrc was executed": > http://stackoverflow.com/questions/3896882 > > "Custom environment with gnome-terminal": > http://askubuntu.com/questions/600139 > > "Opening multiple tabs with gnome-terminal": > http://askubuntu.com/questions/277543 > > Because you want the positional parameters set with bash -s to take precedence over anything set in the startup files. Otherwise anything in .bashrc would simply override what you set with bash -s.