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
{{ message }}
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
Since scan gets executed against your current workspace, it would be nice to have that context without having to execute ./celerystalk workspace.
I'm thinking something like how virtualenv lists your venv name in the command prompt. Any idea on how difficult this would be to implement?
I took a quick peek at how virtualenv is doing it when you run the activate script. It is just customizing the PS1 variable. Here is a little example script ps1_sandbox.sh I put together that activates a workspace context then deactivates it in case it helps:
#!/bin/bash# execute using: source ps1_sandbox.sh# check if this script has been run by testing of the _PS1_SAVED variable is populated# and if it is populated, restore our original prompt. otherwise customize the promptif! [ -z"${_PS1_SAVED}" ] ;then# this is like the virtualenv "deactivate" to restore original promptecho"[+] Restoring the prompt..."
PS1="$_PS1_SAVED"export PS1
unset _PS1_SAVED
else# save off the original so we can restore it laterecho"[+] Changing the prompt..."
_PS1_SAVED=$PS1export _PS1_SAVED
WORKSPACE_NAME=myworkspace
PS1="($WORKSPACE_NAME) $PS1"export PS1
TEST1="test"export TEST1
fi
The text was updated successfully, but these errors were encountered:
This is an awesome suggestion. I am planning in moving to an interactive REPL which will indeed tell you your current workspace. However, I do plan to keep the CLI version around as well, so this is definitely something i want to keep in the pipeline. Thanks!
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Since
scan
gets executed against your current workspace, it would be nice to have that context without having to execute./celerystalk workspace
.I'm thinking something like how virtualenv lists your venv name in the command prompt. Any idea on how difficult this would be to implement?
I took a quick peek at how
virtualenv
is doing it when you run theactivate
script. It is just customizing the PS1 variable. Here is a little example scriptps1_sandbox.sh
I put together that activates a workspace context then deactivates it in case it helps:The text was updated successfully, but these errors were encountered: