Hot answers tagged ansi-term
Terminal parameters are stored as $LINES and $COLUMNS variables. Additionally you can use special term-operation programm, for example tput: tput lines # outputs the number of lines of the present terminal window. tput cols # outputs the number of columns of the present terminal window.
This command should give you the number of lines on the terminal: stty size | cut '-d ' -f1 Some systems might not implement stty size so you might need something like this instead: stty -a | tr \; \\012 | grep rows | tr -d ' rows'
tmux 1.8 added the -e option to capture-pane; using this new option causes the captured data to include the effective escape sequences. bind H capture-pane -e \; save-buffer ~/tmux.hardcopy \; delete-buffer (You can omit -b 0 since buffer 0 is the default buffer if one is not specified.)
I worked out an approach that lets you find out specifically what terminals are available on the remote host and then set it. Usually, there is at least one ansi compatible terminal, so a 'hack' to fake it should be unnecessary. Done in one long'ish ssh command, it will look something like this: ssh -i ~/.ssh/some_key.pub -tty some_remote_server "export ...
How about this command? M-x ansi-color-for-comint-mode-on
Have you got specific operations in mind? Here is an example of using standout mode, which on many terminals will give a strong visible result: tput smso; echo hello, world; tput rmso If you were to pipe the sequence to, say, cat, the highlighting would become an empty operation because a pipe isn't a device that understands standout mode: ( tput smso; ...
Actually it is possible to inquire DEC terminals (and their clones and emulations, including xterm) about their capabilities; just not about individual escape sequence support (or its completeness). UNIX generally doesn't use this feature, relying on termcap/terminfo databases (which document the quirks as well). For reference, the sequences are DA ...
It works when I put export TERM="xterm" before dircolors.
You probably have a $LS_COLORS environment variable defined somewhere in your ~/.bashrc/~/.zshrc... (probably via a call of eval "$(dircolors)"). The php that you run on the command-line will inherit your shell's environment, including that $LS_COLORS variable. While the one started by apache2 will inherit apache2's environment which is unlikely to have ...
Only top voted, non community-wiki answers of a minimum length are eligible