summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/api/apps.py2
-rw-r--r--ranger/defaults/apps.py25
-rw-r--r--ranger/defaults/keys.py17
-rw-r--r--ranger/defaults/options.py18
4 files changed, 15 insertions, 47 deletions
diff --git a/ranger/api/apps.py b/ranger/api/apps.py
index c01e13a7..7d265aed 100644
--- a/ranger/api/apps.py
+++ b/ranger/api/apps.py
@@ -16,7 +16,7 @@
 This module provides helper functions/classes for ranger.defaults.apps.
 """
 
-import os, sys
+import os, sys, re
 from subprocess import Popen, PIPE
 from ranger.ext.iter_tools import flatten
 from ranger.shared import FileManagerAware
diff --git a/ranger/defaults/apps.py b/ranger/defaults/apps.py
index 23477180..15808c17 100644
--- a/ranger/defaults/apps.py
+++ b/ranger/defaults/apps.py
@@ -1,25 +1,14 @@
-# Copyright (c) 2009, 2010 hut <hut@lavabit.com>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-import os
-from re import compile, VERBOSE
+"""
+This is the default ranger configuration file for filetype detection
+and application handling.
+"""
+
 from ranger.api.apps import *
 
-INTERPRETED_LANGUAGES = compile(r'''
+INTERPRETED_LANGUAGES = re.compile(r'''
 	^(text|application)\/x-(
 		haskell|perl|python|ruby|sh
-	)$''', VERBOSE)
+	)$''', re.VERBOSE)
 
 class CustomApplications(Applications):
 	def app_default(self, c):
diff --git a/ranger/defaults/keys.py b/ranger/defaults/keys.py
index ca85bc33..24c35648 100644
--- a/ranger/defaults/keys.py
+++ b/ranger/defaults/keys.py
@@ -1,18 +1,5 @@
-# Copyright (c) 2009, 2010 hut <hut@lavabit.com>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
 """
+This is the default key configuration file of ranger.
 Syntax for binding keys: bind(*keys, fnc)
 
 keys are one or more key-combinations which are either:
@@ -22,7 +9,7 @@ keys are one or more key-combinations which are either:
 
 fnc is a function which is called with the CommandArgument object.
 
-The CommandArgument object has these methods:
+The CommandArgument object has these attributes:
 arg.fm: the file manager instance
 arg.wdg: the widget or ui instance
 arg.n: the number typed before the key combination (if allowed)
diff --git a/ranger/defaults/options.py b/ranger/defaults/options.py
index d2df0b05..cb4d90f7 100644
--- a/ranger/defaults/options.py
+++ b/ranger/defaults/options.py
@@ -1,16 +1,8 @@
-# Copyright (c) 2009, 2010 hut <hut@lavabit.com>
-#
-# Permission to use, copy, modify, and/or distribute this software for any
-# purpose with or without fee is hereby granted, provided that the above
-# copyright notice and this permission notice appear in all copies.
-#
-# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
-# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
-# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
-# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
-# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
-# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+"""
+This is the default configuration file of ranger.
+If you do any changes, make sure the import-line stays
+intact and the type of the value stays the same.
+"""
 
 from ranger.api.options import *