I spend most of my time working in Unix environments and using terminal emulators. I try to use color on the command line, because color makes the output more useful and intuitive.
What options exist to add color to my terminal environment? What…
I have an issue where if I type in very long commands in bash the terminal will not render what I'm typing correctly. I'd expect that if I had a command like the following:
username@someserver ~/somepath $ ssh -i…
I used several colors in my bash PS1 prompt such as:
\033]01;31\] # pink
\033]00m\] # white
\033]01;36\] # bold green
\033]02;36\] # green
\033]01;34\] # blue
\033]01;33\] # bold yellow
Where can I find a list of the color codes I can use?
I…
I've noticed this on occasion with a variety of applications. I've often thought it was because the output was cancelled early (ctrl+c, for example) or something similar, and zsh is filling in a new line character. But now curiosity has gotten the…
Often when I start looking at history of commands some of the characters from a command displayed aren't erased, for example:
What's happening:
prompt$ some_command
prompt$ some_commanother_command
What should have happened:
prompt$…
I just ran across a screenshot of someone's terminal:
Is there a list of all of the characters which can be used in a Bash prompt, or can someone get me the character for the star and the right arrow?
I like to keep my bash_profile in a git repository and clone it to whatever machines I have shell access to. Since I'm in tmux most of the time I have a user@host string in the status line, rather than its traditional spot in the shell prompt.
Not…
I can print my current working dir like this
myPrompt$ pwd
/Users/me/myDir
I want my shell to look like this
/Users/me/myDir$ pwd
/Users/me/myDir
Is that possible? How can I do it?
I use bindkey -v (for bash-ers set -o vi I think that works in zsh too) or vi(m) mode. but it bugs me that I don't have any visual cue to tell me whether I'm in insert mode or command mode. Does anyone know how I can make my prompt display the mode?
When I log on into the shell I see the prompt whose value is stored in PS1.
I also encountered another prompt (but do not know which one) when I used the here-document syntax:
bc << HERE
>
But that is all the types of prompts. I have encountered so…
I recently decided to change my PS1 variable to accommodate some pretty Solarized colors for my terminal viewing pleasure. When not in a tmux session, everything is great! Rainbows, ponies, unicorns and a distinguishable prompt! Cool!
The problem is…
I have seen in some screen-shots (can't remember where on the web) that the terminal can display the [username@machine /]$ in bold letters. I'm looking forward to getting this too because I always find myself scrolling through long outputs to find…
In my .bashrc, I use ANSI terminal color codes to colorize various bits. It looks like this:
PS1='\u@\h:\w\[\033[33m\]$(virtual_env)\[\033[32m\]$(git_branch)\[\033[0m\]$ '
where virtual_env and git_branch are bash functions that output stuff on…
Bash has the PROMPT_DIRTRIM option, e.g. when I set PROMPT_DIRTRIM=3, then a long path like:
user@computer: /this/is/some/silly/path
would show instead as:
user@computer: .../some/silly/path
Does a similar option exist for zsh?
What I get:
host:~ user$ cat example.txt
some texthost:~ stas$
What I want to get:
host:~ user$ cat example.txt
some text
host:~ stas$
Is there a way I can make cat behave like this?
I'm using bash on Mac OS X.