{"push_id":3003366943,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"bb0c88f21d9ee815f31f0c1e1093beff426e24dc","before":"5d560144432642a91f6e1661bed22e637226c8fe","commits":[{"sha":"bb0c88f21d9ee815f31f0c1e1093beff426e24dc","author":{"name":"Gregory Nisbet","email":"c739f27ccb86b59b60e18fdb049e9afbf72bb21a@gmail.com"},"message":"activate.csh handle newlines & don't use basename (#1200)\n\n* activate.csh handle newlines -- don't use basename\r\n\r\nCurrent `activate.csh` script is not robust against newlines in the prompt and uses `basename` unnecessarily.\r\n\r\nFor example, this `.tcshrc` file contains a prompt that breaks the script\r\n\r\n```\r\nonintr -\r\n\r\nset tcshrc_nl = '\\\r\n'\r\n\r\n if ($?prompt) then\r\n    set ellipsis = \"...\"\r\n    set prompt = \"$tcshrc_nl:q\"\"%B[%.03]%b %# \"\r\n endif\r\n\r\nonintr\r\n```\r\n\r\nI modified the script to detect the presence of newlines and avoid changing the prompt at all in those cases.\r\n\r\nThe correct thing to do would probably be to add '[...]' to the beginning of the last line of the prompt, but I don't know of any easy way to accomplish that with csh. I briefly looked into `s///`-type substitution and using a temporary array variable to split the string into lines, but couldn't get it to work.\r\n\r\n`tcsh` and `csh` also have the `:t` modifier for returning the last `/`-delimited component from a path, e.g.\r\n\r\n```\r\n[~] > set a = /a/b/c/d\r\n[~] > echo $a:t\r\nd\r\n```\r\n\r\n* add changelog","distinct":true,"url":"https://api.github.com/repos/pypa/virtualenv/commits/bb0c88f21d9ee815f31f0c1e1093beff426e24dc"}]}
{"actor":{"display_login":"gaborbernat"}}