diff --git a/lib/block-and-line-comment.js b/lib/block-and-line-comment.js index fdccad4..553fab8 100644 --- a/lib/block-and-line-comment.js +++ b/lib/block-and-line-comment.js @@ -14,8 +14,10 @@ function toggle(){ const editorView = atom.views.getView(editor); const buffer = editor.getBuffer(); const selections = editor.getSelections(); + const grammar = editor.getGrammar().name; + const exceptions = ['Shell Script']; - if (monoline(editor.getGrammar().name)||(selections.length===1 && selectionIsEmpty(selections[0]))) + if (monoline(grammar)||(selections.length===1 && selectionIsEmpty(selections[0]))||(exceptions.indexOf(grammar) > -1)) atom.commands.dispatch(editorView, 'editor:toggle-line-comments') else cblock(editor,editorView,buffer,selections)