--- a/bash.rst Wed Nov 04 19:53:49 2009 +0200
+++ b/bash.rst Wed Nov 04 19:53:55 2009 +0200
@@ -8,9 +8,32 @@
PS1='\u@\H$ '
-When xterm start bash - it start as nonlogin. So ~/.bash_profile and ~/.bashrc
+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 readed.
+That make bash interactive and init file read.
+
+* Command history.
+
+Bash allow accessing to command that you type previously. There are exist
+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 neediness, 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.
--- a/cmd.rst Wed Nov 04 19:53:49 2009 +0200
+++ b/cmd.rst Wed Nov 04 19:53:55 2009 +0200
@@ -1,5 +1,45 @@
-*- outline -*-
+* Variables.
+
+Variable name start with letter and underscore, next chars can be letter,
+number and underscore. Variable name is case insensitive.
+
+** List of variables.
+
+ cmd> set
+...
+VAR=VALUE
+
+** Getting.
+
+Write %VAR% in place where you want insert variable VAr value.
+
+** Setting.
+
+ cmd> set /p VAR=VALUE
+
+VAR is variable name, VALUE is value.
+
+** Deleting.
+
+ cmd> set VAR=
+
+VAR is variable name.
+
+** Input from user.
+
+ cmd> set /p VAR=PROMPT
+
+VAR is variable name, PROMPT is displayed prompt.
+
+** Input from file.
+
+ cmd> set /p VAR=<FILE
+
+VAR is variable name, FILE is file name. Sfter executing VAR contain first
+line from FILE.
+
* CMD tricks.
$ set /p TOOLOUTPUT= < temp.txt
--- a/emacs.rst Wed Nov 04 19:53:49 2009 +0200
+++ b/emacs.rst Wed Nov 04 19:53:55 2009 +0200
@@ -1,5 +1,19 @@
-*- mode: outline; coding: utf-8 -*-
+* Variables.
+
+Select one of:
+
+ (set 'variable value)
+ (setq variable value)
+ (defvar variable value "documentation")
+
+or
+
+ # Local variables:
+ # variable: value
+ # End:
+
* Debugging.
** Using edebug.