Python Forum
Help with cursor in terminal
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with cursor in terminal
#1
I haven't been able to find a forum where this clearly belongs so I hope I will be redirected if this is a wrong place.

I'm trying to learn python. I have a terminal window open on a mac. In front of the blinking block cursor is the text "jim@jims-MacBook-Pro ~ % ". I would like to just have "%" to save space, but after going through all the preferences for terminal I'm unable to find an option, preference, or setting to accomplish this. Do any experienced pythoners know what to do?

Thanks very much.
Jim
Reply
#2
Try the query "How to customize the terminal prompt on a macbook" in a search engine perhaps. I don't use macbooks but you may need to find if your shell is a zsh or bash or some other shell first.
« We can solve any problem by introducing an extra level of indirection »
Reply
#3
There is too much ambiguity and for these situations in Python there is a rule "In the face of ambiguity, refuse the temptation to guess.".

What shell? How environmental variables are set up between (in case of bash) .bashrc, bash_profile and .profile or .zhsrc and .profile (in case of zsh)

From Apple:

Quote:Login Scripts
OS X provides support for login scripts and environment property lists to allow you to set environment variables and aliases that are automatically set whenever you run a new shell. There are two ways to do this:

Bourne shell (bash, zsh, and so on):
To persistently set environment variables and add aliases, you can add the appropriate alias, variable assignment, and export commands to the following files:

~/.profile—executed automatically for all login shells.
~/.bash_profile—similar to .profile, but only runs for bash login shells.
~/.bashrc and ~/.zshrc—executed automatically for all non-login bash or zsh shells (when you explicitly type bash or zsh on the command line or run a script that starts with #!/bin/bash or #!/bin/zsh).
You may also find it useful to create a .bashrc file that sources your .profile file. For example:
. $HOME/.profile
I'm not 'in'-sane. Indeed, I am so far 'out' of sane that you appear a tiny blip on the distant coast of sanity. Bucky Katt, Get Fuzzy

Da Bishop: There's a dead bishop on the landing. I don't know who keeps bringing them in here. ....but society is to blame.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Cursor Variable inside Another Cursor . CX_ORacle paulo79 1 1,618 Apr-09-2022, 10:24 AM
Last Post: ibreeden

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020