For tcsh, I have a prompt that is multiline:
set prompt = "%/\\ %n@%m[%h]% "
This shows the cwd on one line and then the user/host on second line. However, with this, I cannot make a copy of that:
setenv X "$prompt" Unmatched ".
The reason this is an issue for me, is that when I use virtualenv to create virtual environment for Python, it will automatically create an "activate" script, which as part of the script, it saves the current prompt and alters it to include virtual environment info. The prompt is restored, when the "deactivate" script is invoked.
Is there a way to assign a multiline variable to another?
I'm thinking I need to just give up on the multiline prompt, because I think I'll have problems, once the activate script is invoked, as I have aliases for updating the prompt (I got this a long time ago from someone). From my .cshrc file:
alias set_prompt 'set prompt = "%/\\ %n@%m[%h]% "' alias cd 'cd \!*; set_prompt' set_prompt
Is there any better way to do this, so that the prompt is updated when moving, but I can also use the activate script to alter the prompt? Here is a fragment from the automatically generated activate script for reference:
set _OLD_VIRTUAL_PROMPT="$prompt" if ("" != "") then set env_name = "" else if (`basename "$VIRTUAL_ENV"` == "__") then # special case for Aspen magic directories # see http://www.zetadev.com/software/aspen/ set env_name = `basename \`dirname "$VIRTUAL_ENV"\`` else set env_name = `basename "$VIRTUAL_ENV"` endif endif set prompt = "[$env_name] $prompt"