Extra symbols after machine name on command prompt in xterm

hajime

macrumors 603
Original poster
Jul 23, 2007
5,893
813
Hi, I installed XQuartx and opened a xterm terminal. On the command prompt, it shows: hajime@machinename ~ % cursorsymbol
Same thing when I used the terminal program.

Why there are three extra characters ' ~ ' after machinename? Could you please let me know how to get rid of them? Thanks
 

MacUser2525

macrumors 68000
Mar 17, 2007
1,948
290
Canada
Yes you need to edit the PS1 setting to what you desire. An article on someone wanting to add what you do not want. You will need to find where it is being set for the xterm.

 
  • Like
Reactions: hajime

Mikael H

macrumors 6502a
Sep 3, 2014
693
337
Yes you need to edit the PS1 setting to what you desire. An article on someone wanting to add what you do not want. You will need to find where it is being set for the xterm.

In addition to the above, the ”%” prompt indicates the OP is using the now-default zsh environment rather than Bash as per the article in the link. Although mostly compatible, zsh may provide different abilities in some areas.
 

hajime

macrumors 603
Original poster
Jul 23, 2007
5,893
813
In addition to the above, the ”%” prompt indicates the OP is using the now-default zsh environment rather than Bash as per the article in the link. Although mostly compatible, zsh may provide different abilities in some areas.
Is zsh a new thing? It shows up on the terminal. Never heard of it before. Used Bash when in school many years ago.
 

Mikael H

macrumors 6502a
Sep 3, 2014
693
337
Is zsh a new thing? It shows up on the terminal. Never heard of it before. Used Bash when in school many years ago.
Apple hasn’t been updating their Bash version in forever and finally decided to make their default something with a license that doesn’t require them to be as open with their source code.

zsh in itself isn’t particularly new. The benefit is that it’s mainly bash compatible. It also is very expandable.
 
  • Like
Reactions: hajime