From e7fb542980c250498b6dbd378546effabdf115db Mon Sep 17 00:00:00 2001 From: chrys Date: Mon, 3 Oct 2016 18:02:02 +0200 Subject: [PATCH] ignore also shell buildins --- .../commands/onInput/62000-spell_check.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/fenrir-package/commands/onInput/62000-spell_check.py b/src/fenrir-package/commands/onInput/62000-spell_check.py index 8601a8f4..1914218a 100644 --- a/src/fenrir-package/commands/onInput/62000-spell_check.py +++ b/src/fenrir-package/commands/onInput/62000-spell_check.py @@ -71,14 +71,10 @@ class command(): if not(newContent[self.env['screenData']['newCursor']['x']].isspace() and x != self.env['screenData']['newCursor']['x']): return - if currWord == '': + # ignore bash buildins and empty + if currWord in ['','cd','fg','bg','alias','bind','dir','caller','buildin','command','declare','echo','enable','help','let','local','logout',\ + 'mapfile','printf','read','readarray','source','type','typeset','ulimit','unalias']: return - if currWord == 'cd': - return - if currWord == 'fg': - return - if currWord == 'bg': - return if currWord.startswith('-'): return if currWord.startswith('/'): @@ -87,6 +83,8 @@ class command(): return if currWord.startswith('./'): return + if '@' in currWord and '.' in currWord: + return if currWord.startswith('@'): return if currWord.isnumeric(): @@ -95,6 +93,7 @@ class command(): return if currWord.isspace(): return + try: if os.path.exists("/bin/"+currWord): return