You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running pew workon some-env a new shell is spawned. workon_cmd() retrieves a potential project directory and eventually runs a configured shell with specific environment variables (cmiiw). This has a couple of consequences and I was wondering why a new shell is spawned versus "just" setting the environment variables and setting the possible current working directory.
Two points that are less ideal imo when spawning a shell when running pew workon some-env:
In my case, the Bash history of the shell session that executed pew workon some-env is not available, because the new shell reads the ~/.bash_history, which has not yet been updated. This means I cannot do the following: (1) run a command, seeing that I need to set my specific virtual environment, (2) running pew workon some-env, and (3) doing ArrowUp + Enter to invoke the previous command from step (1), since those commands are not yet written
When running pew workon in the same session multiple times, you will have nested shells that you have to remember, but maybe certain people prefer this method
What do you think about this? Would merely changing the directory + setting the environment variables also work, and if not, what are the downsides of it?
The text was updated successfully, but these errors were encountered:
When running
pew workon some-env
a new shell is spawned.workon_cmd()
retrieves a potential project directory and eventually runs a configured shell with specific environment variables (cmiiw). This has a couple of consequences and I was wondering why a new shell is spawned versus "just" setting the environment variables and setting the possible current working directory.Two points that are less ideal imo when spawning a shell when running
pew workon some-env
:pew workon some-env
is not available, because the new shell reads the~/.bash_history
, which has not yet been updated. This means I cannot do the following: (1) run a command, seeing that I need to set my specific virtual environment, (2) runningpew workon some-env
, and (3) doing ArrowUp + Enter to invoke the previous command from step (1), since those commands are not yet writtenpew workon
in the same session multiple times, you will have nested shells that you have to remember, but maybe certain people prefer this methodWhat do you think about this? Would merely changing the directory + setting the environment variables also work, and if not, what are the downsides of it?
The text was updated successfully, but these errors were encountered: