# HG changeset patch # User Oleksandr Gavenko # Date 1321812888 -7200 # Node ID 639665016a27c78b2b9b765cee3a3901ecefb759 # Parent 49735af701213f85aa36b2ead5c56874ae84847b# Parent d362fd4a19957fcec9b8ec4133a2dc1e552e3764 merged diff -r d362fd4a1995 -r 639665016a27 bash.rst --- a/bash.rst Mon Nov 14 23:50:03 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -.. -*- coding: utf-8; -*- - -======= - Bash. -======= - -How override PS1, PS2? -====================== - -When loading bash read ~/.bash_profile and ~/.bashrc. - -Put at end of these files:: - - PS1='\u@\H$ ' - -When xterm start bash - it start as non-login. So ~/.bash_profile and ~/.bashrc -didn't read. To workaround this use:: - - $ xterm -e bash -i -c "mc -x" - -That make bash interactive and init file was readed. - -Command history. -================ - -Bash allow accessing to command that you type previously. There are several -options to control command history behavior. Set corresponding variables in -your ~/.bashrc file (which is read by interactive shell):: - - # ignorespace do not save lines that start with space - # erasedups all previous lines matching the current line to be removed from - # the history list before that line is saved - export HISTCONTROL=igrorespace:erasedups - export HISTIGNORE=" ?cd *":"e *":"sudo mv *":"sudo rm *":"sudo cp *":"sudo mkdir *":"sudo chmod *":"sudo chown *":ls:pwd:"vlc*" - -There are another options, with default values (which satisfy my needs, so -I don't put they to ~/.bashrc):: - - export HISTFILE=~/.bash_history # where is command history stored - export HISTFILESIZE=500 # how many lines been in $HISTFILE - export HISTSIZE=500 # how many lines been stored in bash process - -mc (GNU Midnight Commander). ----------------------------- - -You can also set special history rules for mc subshell in ~/.mc/bashrc file. - -Bash history. -============= - - http://wiki.bash-hackers.org/scripting/bashchanges - This article is an incomplete overview of changes to Bash over - the time. - - diff -r d362fd4a1995 -r 639665016a27 cpp.rst --- a/cpp.rst Mon Nov 14 23:50:03 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -.. -*- coding: utf-8; -*- - -======================= - cpp (C preprocessor). -======================= - -How to see macros expansion? -============================ - -GCC:: - - $ cpp .c - -MSVC:: - - $ cl /E .c - -Who to see predefined macros? -============================= - -See: - - http://predef.sourceforge.net/ - http://en.wikipedia.org/wiki/C_preprocessor#Compiler-specific_predefined_macros - http://msdn.microsoft.com/en-us/library/b0084kay.aspx - Predefined Macros - -GNU C Compiler:: - - $ gcc -dM -E - < /dev/null - -HP-UX ansi C compiler:: - - $ cc -v EMPTY.c - -SCO OpenServer C compiler:: - - $ cc -## EMPTY.c - -Sun Studio C/C++ compiler:: - - $ cc -## EMPTY.c - -IBM AIX XL C/C++ compiler:: - - $ cc -qshowmacros -E EMPTY.c - -For Visual Studio compiler there no any possibility get predefined macros from -command line... But some macros documented: - - _MSC_VER - Defines the compiler version. Always defined. - _WIN32 - Defined for applications for Win32. Always defined. - - diff -r d362fd4a1995 -r 639665016a27 html.rst --- a/html.rst Mon Nov 14 23:50:03 2011 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -.. -*- coding: utf-8 -*- - -======= - HTML. -======= - -Page encoding. -============== - -Place in HEAD tag (CHARSET is one among of defined by -http://www.iana.org/assignments/character-sets):: - - - -See: - - http://www.w3.org/TR/REC-html40/charset.html#h-5.2.2 - -Center an object. -================= - -To center blog-level element:: - -
-
SOME
-
- -To center inline element:: - -

TEXT

- -Browser support. -================ - - * http://htmlbook.ru/ - * http://www.quirksmode.org/ - diff -r d362fd4a1995 -r 639665016a27 terminal.rst --- a/terminal.rst Mon Nov 14 23:50:03 2011 +0200 +++ b/terminal.rst Sun Nov 20 20:14:48 2011 +0200 @@ -87,4 +87,10 @@ $ cat out.file ... +Installing terminal utilities. +============================== +For Cygwin:: + + $ setup.exe -p ncurses +