VanDyke Software Forums

VanDyke Software Forums (https://forums.vandyke.com/index.php)
-   SecureCRT on the Mac (https://forums.vandyke.com/forumdisplay.php?f=24)
-   -   Local Shell - strange bash prompt (https://forums.vandyke.com/showthread.php?t=13279)

waynespa 10-03-2018 11:09 PM

Local Shell - strange bash prompt
 
Hi guys,

When I hit command-L for a local shell tab, I get the following bash prompt

37;RemoteHost=waynes@Waynes-MacBook-Pro.local37;CurrentDir=/Users/waynes37;ShellIntegrationVersion=11;shell=bash3;C;37;RemoteHost=waynes@Waynes-MacBook-Pro.local37;CurrentDir=/Users/waynes3;D;03;AWaynes-MacBook-Pro:~ waynes$ 3;B
3;C;37;RemoteHost=waynes@Waynes-MacBook-Pro.local37;CurrentDir=/Users/waynes3;D;03;AWaynes-MacBook-Pro:~ waynes$ 3;B
3;C;37;RemoteHost=waynes@Waynes-MacBook-Pro.local37;CurrentDir=/Users/waynes3;D;03;AWaynes-MacBook-Pro:~ waynes$ 3;B


Anyone else getting this or know how to fix?

SCRT Version 8.5.0 (build 1740)
MacOS 10.14

Many thanks

bgagnon 10-04-2018 08:50 AM

Hi waynespa,

Do you see the same issue in Mac's native Terminal app?

Do you (or have you in the past) had iTerm2 installed on this machine?

If so, I believe this is because iTerm customizations (due to enabling Shell Integration) to the environment are not compatible with a native Xterm terminal. There are escape sequences that don't mean anything to an Xterm; they end up resulting in the display of the garbage since SecureCRT doesn't know how to interpret the iTerm2 specific customizations (and SecureCRT shouldn't be expected to know how to handle these custom-to-iterm2 sequences).

Since only iTerm (or other "in-the-know" apps) can interpret the customized escape sequences, you will need to follow instructions on disabling iterm2's Shell Integration, or have a Logon Action in SecureCRT for your local shell connections (the default session) to do something like below (YouTube video demonstrating Default Session):

Code:

  Expect:      waynes$ 3;B
  Send:        export PROMPT_COMMAND='echo -ne "\033]2;${USER}@{$HOSTNAME}\007"'

Here's links to a couple forum posts about Logon Actions:

https://forums.vandyke.com/showpost....60&postcount=6

https://forums.vandyke.com/showthread.php?t=13260

I have added this thread to a feature request in our product enhancement database for an option for SecureCRT to nicely handle the customizations associated with iterm2's Shell Integration. Should a future release of SecureCRT include this feature, notification will be posted here.

If you prefer direct email notification, send an email to support@vandyke.com and include "Feature Request - Forum Thread #13279" in the subject line or use this form from the support page of our website.

waynespa 10-06-2018 06:34 AM

Solved
 
Hi Brenda,

Thanks for the reply you were 100% correct

I removed the iTerm2 Shell integration and used this guide https://www.alexkras.com/remove-shel...n-from-iterm2/

bgagnon 10-06-2018 11:24 AM

Hi waynespa,

Great! Thanks for posting the link for others. :)

sybabe 11-08-2018 06:34 AM

How to change the prompt specifically
 
I'm still trying to figure out where to change the prompt of the local shell. Is it in the Advanced in Terminal Session Options? If so, what do I put in and where?


Quote:

Originally Posted by bgagnon (Post 50311)
Hi waynespa,

Do you see the same issue in Mac's native Terminal app?

Do you (or have you in the past) had iTerm2 installed on this machine?

If so, I believe this is because iTerm customizations (due to enabling Shell Integration) to the environment are not compatible with a native Xterm terminal. There are escape sequences that don't mean anything to an Xterm; they end up resulting in the display of the garbage since SecureCRT doesn't know how to interpret the iTerm2 specific customizations (and SecureCRT shouldn't be expected to know how to handle these custom-to-iterm2 sequences).

Since only iTerm (or other "in-the-know" apps) can interpret the customized escape sequences, you will need to follow instructions on disabling iterm2's Shell Integration, or have a Logon Action in SecureCRT for your local shell connections (the default session) to do something like below (YouTube video demonstrating Default Session):

Code:

  Expect:      waynes$ 3;B
  Send:        export PROMPT_COMMAND='echo -ne "\033]2;${USER}@{$HOSTNAME}\007"'

Here's links to a couple forum posts about Logon Actions:

https://forums.vandyke.com/showpost....60&postcount=6

https://forums.vandyke.com/showthread.php?t=13260

I have added this thread to a feature request in our product enhancement database for an option for SecureCRT to nicely handle the customizations associated with iterm2's Shell Integration. Should a future release of SecureCRT include this feature, notification will be posted here.

If you prefer direct email notification, send an email to support@vandyke.com and include "Feature Request - Forum Thread #13279" in the subject line or use this form from the support page of our website.


ekoranyi 11-08-2018 09:24 AM

Hi sybabe,

Changing your local prompt is something that is typically handled outside of SecureCRT. The commands/formatting needed to change your prompt will vary depending on the Operating System you are running on.

What Operating System are you using?

Can you elaborate on the changes you are trying to make? What is your prompt displaying now? What would you like your prompt to be?


All times are GMT -6. The time now is 05:26 PM.