[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1.1 Key binding conventions

gitfm now follows a new, easy to remember, scheme to bind commands on keys. This is only a convention, if you define new key bindings you may, or may not follow it.

All the file commands start with ^C. This prefix can be followed by some modifiers, in order to affect the default behavior of the given command. These modifiers are b and r.

b - this modifier specifies that the command will run in background:

	^CM = CHMOD; chmod %s{New mode of %i: ,%m} %i;;;;y

defines a command that changes the current selected files mode in foreground, while

	^CbM = B-CHMOD; chmod %s{New mode of %i: ,%m} %i&;;;;y

defines a background command that does the same thing.

r - this modifier specifies that the command will be run recursively:

	^CrM = R-CHMOD; chmod -R %s{New mode of %i: ,} %i;;;;y

defines a command that recursively changes the mode of the selected entries.

The b and r modifiers can be combined, the resulting command running recursively and in background:

	^CbrM = B-R-CHMOD; chmod -R %s{New mode of %i: ,} %i&;;;;y

You should also note that for some commands (like gzip) there is no need for a non-recursive version. Running gzip recursively on files is harmless. If there is a directory between these files, gzip will recursively compress that directory, so you can use the same key binding for recursively and non-recursively compressing. In fact, it is a matter of selecting files or directories.

Unfortunately, we can't run chmod recursively trying to change the mode of all the files in a directory to 0644 because that directory might contain subdirectories and removing the execution permission from them is a bad idea. So, in this case, we need separate commands.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated by Ian Beckwith on March, 1 2009 using texi2html 1.78.