My home and work computers are both running Mountain Lion w/ latest update.
However, on my work computer, I couldn't get ansi output by default when using laravel or symfony-console component. I need to use --ansi switch to get the colors. I'm using Solarized Dark color scheme.
In home computer, I don't need to set --ansi switch.
So, how can I set to detect terminal ansi by default ?
NOTE: I did try to add CLICOLOR=1 in .bash_profile file. It doesn't work.
Same with you, after check the Symfony\Component\Console\Output\StreamOutput. I install the php posix extension via sudo yum --enablerepo=remi install php-posix then the ansi color is enabled default!
Related
I am using ConEmu 150504 under Windows 10 Enterprise, release 21H2, and I am having some problems when connecting to a linux host via ssh.
There is no cygwin installation at all. Every Windows utility, including ssh, is a non-cygwin version. I mention this here because other similar questions that I have found involve the use of cygwin's ssh, but I want to make it clear that I am not using the cygwin version of ssh nor any other cygwin software.
From within my ConEmu window, I can successfully connect to my linux host, as follows ...
ssh myuserid#the.host.name.com
Once connected to my linux host, I want to use various curses-based and other console-based utilties, including emacs -nw. I have export TERM=xterm properly set in my linux shell, but I am only getting partial console capability.
By "partial", I mean that ANSI color codes are not being honored, and certain control characters are not being honored.
Is there some way to set up ConEmu so that it is totally, completely, 100-percent emulating full xterm capabilities and full ANSI character-code management?
Thank you in advance for any thoughts and suggestions.
PS: setting export TERM=xterm-color and export TERM=xterm-256color in linux don't help at all when I'm using ConEmu.
On the latest macOS High Sierra, iTerm2, zsh, and oh-my-zsh, I've noticed that tab completion when using a multiline prompt is no longer flushing correctly. I've verified this issue on two separate machines and I'm wondering:
if you can also verify this is an issue for you
how to start zeroing in on which system is causing this issue
if you know of a workaround
Example prompt:
PROMPT="$(virtualenv_info) %n at %~ on %M $(vcs_info)
%(!.#.$) "
Which produces:
(myvirtualenv) me at ~/source/some-repo on localhost [master]
$
Issue:
When attempting tab completion for commands like ls or cd, hitting TAB to see subdirectories causes the subsequent print to overwrite the lines containing the prompt:
(myvirtualenv) me at ~/source/some-repo on localhost [master]
$ ls some-f...
Hit TAB
(myvirtualenv) me at ~/source/some-repo on localhost [master]
$ ls some-folder/
Hit TAB again
some-folder/
folder-1/ folder-2/ folder-3/
The above output overwrites the lines containing the prompt. I've tried setting locale info and different kinds of newlines. This multiline prompt still works correctly on an older version of zsh running on a CentOS AWS box I have, and tomorrow I can confirm whether it's still working on a < 10.13 macOS machine.
I was able to narrow this down by deduction to the COMPLETION_WAITING_DOTS setting, which I've now found corroborated in this oh-my-zsh issue. It appears this code behaves differently in High Sierra, so I'll look into that for a workaround or a possible fix. For now my workaround is removing my COMPLETION_WAITING_DOTS="true" setting.
I've added the theme in the zshrc file like so:
ZSH_THEME="agnoster"
But it ends up looking like this:
I'm on Ubuntu Gnome 16.04. What am I missing?
You just need to install a font that contains these characters. for example, you can install Powerline fonts using this command:
sudo apt-get install fonts-powerline
That worked for me as well.
As stated on the agnoster-github-page you need either a
Powerline-patched font
Font that contains the characters needed
Your currently used font seems to be missing the \ue0b0 char. It looks different from what it should look like (A full-line-height one-char-wide right pointing triangle)
I would look into some of these fonts:
Patched fonts for Powerline users
Being a fan of not using patched fonts I prefer Hack and FiraCode
I was having this issue on Debian 9 with urxvt.
Fixed it changing font to Hack. Thanks to #AnimiVulpis answer.
Install Hack font on Debian:
apt-get install fonts-hack-ttf
Configure on ~/.Xresources:
URxvt.font: xft:Hack:size=8
Install Melno For Powerline font and Change default terminal font.
$ git clone https://github.com/abertsch/Menlo-for-Powerline.git
$ cd Menlo-for-Powerline
$ sudo mv Menlo* /usr/share/fonts
Now open terminal
Edit->Preferences-> Unnamed-> Text -> Check Custom font
Now Select your Custom font as Melno For Powerline Regular
I have decided to learn bash. I am using a mac.
In terminal (built in mac version of unix command line) is there a way to set the default theme to homebrew or other? thank you!
Open the Preferences panel of the terminal application, select the Themes tab, choose Homebrew and click on default.
I've been exploring use of MSys lately as an alternative, 'nix-like shell for my windows development. However, the default colors and size are driving me crazy. Anyone have any idea as to how I can change the default size, color, and / or font? Honestly, I'd be happy if I could make the default character width/height of the shell larger, but the others would be nice too...
Clarification: the msys shell is a separate app from the windows shell - the normal 'right-click-upper-left -> properties' configuration (like with the windows shell) is not present.
Looks like underneath it's firing off rxvt. Thanks!
If you're running MSYS bash from a command line, Behind the scenes it's a windows command shell window, so configuring it is just the same.
Right click on the title bar at the
top of the shell window and select
'properties'
Configure the window with the options
on the tabs on the dialog; these
should be fairly self-explanatory.
When you close the dialog, select
'Modify shortcut that started this
window' to save the configuration
back as defaults.
EDIT: If you're running the shell in an xterm or RXVT window through an X server, start the xterm window with -fg (foreground), -bg (background) and -fn (font). Can't remember what the RXVT switches are, but you should be able to see them in the man page. You can also configure them through your .Xdefaults file. Again, see the man page for details.
EDIT: Thanks Paulo - note that MSYS also comes with an X-less version of RXVT, which the OP seems to be using. Here's a link for configuring RXVT on MSYS.
Open the msys.bat file an aroun line 72 it reads like this:
rem Setup the default colors for rxvt.
if "x%MSYSBGCOLOR%" == "x" set MSYSBGCOLOR=White
if "x%MSYSFGCOLOR%" == "x" set MSYSFGCOLOR=Black
if "x%MINGW32BGCOLOR%" == "x" set MINGW32BGCOLOR=LightYellow
if "x%MINGW32FGCOLOR%" == "x" set MINGW32FGCOLOR=Navy
if "%MSYSTEM%" == "MSYS" set BGCOLOR=%MSYSBGCOLOR%
if "%MSYSTEM%" == "MSYS" set FGCOLOR=%MSYSFGCOLOR%
if "%MSYSTEM%" == "MINGW32" set BGCOLOR=%MINGW32BGCOLOR%
if "%MSYSTEM%" == "MINGW32" set FGCOLOR=%MINGW32FGCOLOR%
change the first 4 lines with the colors you like, to change the font, just bellow:
start %WD%rxvt -backspacekey -sl 2500 -fg %FGCOLOR% -bg %BGCOLOR% -sr -fn Courier-12 -tn msys -geometry 80x25 -e /bin/sh --login -i
change the Courier-12 with your favourite font and the 80x25 with your prefered window size.
I create HOME env var, which have value like 'e:\home' and put into %HOME% dir .Xdefaults file with such content:
Rxvt*background: white
Rxvt*foreground: black
Rxvt*geometry: 120x40
Rxvt*font: 7x14
Rxvt*scrollBar: on
Rxvt*saveLines: 5000
Also note that this config successfully work on Cygwin and various Unix boxes.
If you're tired of using cmd for msys git, I recommend using minty and/or ConEmu
:
to use mintty, download latest version from google code/mintty and drop it in the bin folder of git msys + make following shortcut:
"C:\Program Files (x86)\Git\bin\mintty.exe" --title "Git Bash" -w full --exec "C:\Program Files (x86)\Git\bin\sh.exe" --login -i
(set working dir to your home dir)
to use vim, make sure to read this bug report
for colors, make sure gitconfig is set to color = always
I set sublime as my default editor as vim didn't work, see notes below
note:
vim packaged with msys expects cmd terminal and won't work with mintty
interaction to enter username/password for git pushes using basic http auth won't work unless you host mitty in ConEmu. (ssh works fine on mitty by itself)
ref:
rpavlik/git-windows-mintty - notice this does not bundle latest mintty version.
/oumu/mintty-color-schemes