summaryrefslogtreecommitdiff
path: root/alot/commands/__init__.py
Commit message (Collapse)AuthorAge
* Cosmetics, clean up importsAnton Khirnov2021-02-10
|
* helper: get rid of decode_string()Anton Khirnov2021-01-16
| | | | | | | | It just adds unnecessary type confusion. In most places where it is used, the types are always str, so it does nothing. In the few others, the encoding/decoding is better handled explicitly.
* remove old new-style classes syntaxPatrick Totzke2019-05-27
| | | | | | Python3 only supports "new-style" classes (those extending object), and we don't need to explicitly inherit from this root class any more. See http://pylint-messages.wikidot.com/messages:c1001
* add global namedqueries commandPatrick Totzke2018-07-24
| | | | ... that opens a new namedqueries buffer
* Remove old __future__ importsLucas Hoffmann2018-06-19
| | | | They are not needed for python >= 3.0.
* rename parameter of Command.apply methodPatrick Totzke2018-03-11
| | | | | | .. from "caller" to "ui", as used throughout all subclasses. The inconsistent naming causes the codacity code checker (pylint) to complain every time we add a new command subclass.
* pep8 fixesPatrick Totzke2017-09-01
| | | | | This mostly shortens lines down to <=79 chars and fixes some other small things I found using the pep8 tool.
* Replace Exception.message with str(Exception)Dylan Baker2017-08-19
| | | | | | In python3 Exception doesn't have a message attribute, the only way to get the string output is to call str() on the Exception. This also works in python 2.7, so go ahead and make that change.
* settings: do not store SettingsManager instance in __init__.pyDylan Baker2017-08-03
| | | | | | | This can create circular imports in unittests, which causes difficult to debug errors. Fixes #1076
* commands: Use a sphinx code-blockDylan Baker2017-01-31
|
* Use absolute_imports from __future__Lucas Hoffmann2017-01-18
|
* Port old doctests to unittest: alot.commands.__init__Lucas Hoffmann2017-01-18
|
* Replace map() and filter() with comprehensionsDylan Baker2016-12-21
| | | | | | | | This had the advantage of being more readable to people without a functional programming background, and it avoids the need to use lambdas which are both slow and have many corners in python. In a few cases it also allows us to use a generator expression instead of a materialized list, which save some memory.
* Replace mutable keyword argumentsDylan Baker2016-12-13
| | | | | | | | | | | | | | | | | | | | | | | There are a number of cases of mutable keyword arguments (list and dict in this case). Mutable keyword arguments are rather dangerous, since any mutation of the default value is persistent, which will inevitably lead to bugs. For example, imagine this code: def func(def=[]): def.append('foo') return def >>> func() ['foo'] >>> func() ['foo', 'foo'] This is almost certainly not what was intended. This code generally uses the idiom of setting the default value to None, and then assigning with or `value = value or []` which will replace value with the empty list (or dict) when value is falsey, like None or another empty list.
* Clean up importsLucas Hoffmann2016-12-09
| | | | | | - use relative imports if possible - group imports into standard library, third party, and alot modules - sort imports alphabetically
* Use logging's native string interpolationLucas Hoffmann2016-12-09
|
* fix typoPatrick Totzke2013-10-30
|
* canceling a command in a sequence will now stop the subsequent commands from ↵Yann Rouillard2013-10-30
| | | | | | | | being run Conflicts: alot/commands/globals.py alot/ui.py
* pep8&pyflakes fixesPatrick Totzke2013-07-07
| | | | mostly automatically fixed
* changed repeatability default to False and reconsider repeatability of all ↵Sebastian Jeltsch2013-05-26
| | | | Commands
* rm offending line left over from self.repeatable instance propertySebastian Jeltsch2013-05-26
|
* Repeatability class property, mark more cmds as non-repeatableSebastian Jeltsch2013-05-26
|
* change cmd repeatability to be command prop and make move cmds non-repeatableSebastian Jeltsch2013-05-26
|
* Pre/Posthooks are no longer Command.__init__ parmsPatrick Totzke2012-08-19
| | | | | | | but are directly set to cmd.pre/posthook by commandfactory. This still means that these hooks are looked up and stored *in* the cmd obj in the factory: so whenever FooCommand is instanciated from within some other commands apply, the hooks are None.
* cleanup: split widgets.py and pep8/pyflakes fixesPatrick Totzke2012-08-10
|
* add copyright statements to all source filesPatrick Totzke2012-06-14
| | | | cf issue #472
* add helper split_commandstringPatrick Totzke2012-06-03
| | | | | | | | that splits a command string into a list of strings to pass on to subprocess.Popen and the like. This helper is now used throughout the application instead of calling shlex.split directly as this is a potential source for errors because shlex is not yet able to properly deal with unicode bytestrings.
* replace config with SettingsManager in commandsPatrick Totzke2012-02-19
|
* new naming convention for pre/post command hooksPatrick Totzke2012-01-24
| | | | | | | | | | | | command names alone do not uniquely determine a command as we do have several differend Commands registered with the same name but for different modes. pre and post hooks are from now on named [pre|post]_[modestring]_[commandname]. This commit adjusts the lookup code for command hooks and corrects the user docs accordingly. closes #282
* fixed accidentally shifted docstringPatrick Totzke2012-01-24
|
* move hook lookups to AlotConfigParserPatrick Totzke2011-12-11
| | | | issue #146
* pep8Patrick Totzke2011-12-11
|
* remove unused Command.get_helpstringPatrick Totzke2011-12-11
|
* Merge branch 'master' into docsPatrick Totzke2011-12-10
|\
| * read commands help from docstrings if undefinedPatrick Totzke2011-12-10
| | | | | | | | | | | | if the help parameter to the registercommand decorator is unset, take the classes docstring. this way one doesn't have to duplicate it for simple commands
* | commands docsPatrick Totzke2011-12-08
|/
* cleanupPatrick Totzke2011-11-26
| | | | issue #137
* cleanupPatrick Totzke2011-11-05
|
* use string_decode instead of str.decodePatrick Totzke2011-10-22
|
* fix quoting in shlexPatrick Totzke2011-10-18
| | | | | | and catch ValueError on non-matching quotes. Explicit quoting in a commandprompt has been swallowed by shlex before.
* cleanupPatrick Totzke2011-10-16
|
* pep8 fixesPatrick Totzke2011-10-16
|
* fix ! for shellescape and error handlingPatrick Totzke2011-10-16
|
* colect args in globals refine/searchPatrick Totzke2011-10-16
|
* helpstrings and pep8Patrick Totzke2011-10-16
|
* help stringsPatrick Totzke2011-10-15
|
* fix help without parametersPatrick Totzke2011-10-15
|
* utf8 fixes after shlexPatrick Totzke2011-10-15
|
* decorate envelope:toggletagPatrick Totzke2011-10-15
|
* use shlexPatrick Totzke2011-10-15
|