Closed greyhoundforty closed 9 years ago
It seems to fail when trying to change the prompt back to what it was before starting prm.
Could you try replacing the contents on line 144 with export PS1="$(cat $prm_dir/.prompt.d)"
, i.e. placing the variable value in quotes?
BTW, have you had to any/much fiddling with the script to make it work with zsh?
@greyhoundforty: I have now updated the line in question, though there might be more issues (e.g. cd-ing from scripts might not work) because of the hashbang, if I understand correctly.
Please let me know whether the problem persists or not.
Looks like this is due to the way ZSH ( in my case Prezto) is interpreting the ()'s in the if statement:
Stopping project illustris
rm: remove regular file ‘/home/ryan/.prm/.active-2897.tmp’? n
rm: remove regular file ‘/home/ryan/.prm/.path-2897.tmp’? n
rm: remove regular file ‘/home/ryan/.prm/.prompt-2897.tmp’? n
/home/ryan/prm/prm.sh:204: parse error near `)'
It does not exit the shell though so that is good news. I am relatively new to ZSH so I am going to keep hacking on it. Love the utility
Getting there. Found the right syntax for the if statement in ZSH:
Stopping project vagrant
rm: remove regular file ‘/home/ryan/.prm/.active-13099.tmp’? y
rm: remove regular file ‘/home/ryan/.prm/.path-13099.tmp’? y
rm: remove regular file ‘/home/ryan/.prm/.prompt-13099.tmp’? y
/home/ryan/prm/prm.sh:200: no matches found: .active*
ryan@galileo ~/.prm ❯❯❯ awk NR==204 ~/prm/prm.sh
if [[ ! $(ps -p $pid > /dev/null) ]]; then
Glad you like it!
I just pushed an update that should make prm compatible with zsh
.
Let me know how it works!
Hi ! prm stops properly for me in zsh (ohmyzsh).
Congrats, it's really handy :)
@vindarel: Good to hear. Thank you, glad you find it useful!
@greyhoundforty: Are you still having issues, or does prm work properly now?
@eivind88 Looks to be working for me now. Might have had some legacy cruft left from the initial install:
ryan@athena ~ ❯❯❯ prm start illustris
Starting project illustris
Already up-to-date.
ryan@athena ~/illustris- ❯❯❯ prm stop illustris master ✱
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: runcoms/zshrc
no changes added to commit (use "git add" and/or "git commit -a")
Stopping project illustris
Great! I'll close the issue, then.
I am sure that is probably not supported but any chance you can point me to why project stop is failing to drop back to a normal shell