diff options
author | Mark Allen <[email protected]> | 2017-10-23 15:32:43 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2017-10-23 15:32:43 -0500 |
commit | a4f78a4ca4d7d568b328c0fff58c2f7295595a2e (patch) | |
tree | 23e5c59b84788076937982166dcca9325bb590a2 | |
parent | cc67250f7cd42d706a00c965863d47f08870e8a4 (diff) | |
parent | 69d3c0f1f24d58b3a7327ce15ba1e23e8a01e3f3 (diff) | |
download | kerl-a4f78a4ca4d7d568b328c0fff58c2f7295595a2e.tar.gz kerl-a4f78a4ca4d7d568b328c0fff58c2f7295595a2e.tar.bz2 kerl-a4f78a4ca4d7d568b328c0fff58c2f7295595a2e.zip |
Merge pull request #225 from rciorba/fish_activate
suggest the correct activate script based on parent process command
-rwxr-xr-x | kerl | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -974,8 +974,23 @@ ACTIVATE_CSH build_plt "$absdir" fi + PID=$$ + PARENT_PID=$(ps -p $PID -o ppid | grep -E "[0-9]+" -o) + PARENT_CMD=$(ps -p $PARENT_PID -o ucomm | tail -n 1) + case "$PARENT_CMD" in + fish) + SHELL_SUFFIX=".fish" + ;; + csh) + SHELL_SUFFIX=".csh" + ;; + *) + SHELL_SUFFIX="" + ;; + esac + echo "You can activate this installation running the following command:" - echo ". $absdir/activate" + echo ". ${absdir}/activate${SHELL_SUFFIX}" echo "Later on, you can leave the installation typing:" echo "kerl_deactivate" } |