jayhjkwon / atom-block-comment

block comment/uncomment for atom editor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

added support for *.sh files...

masavini opened this issue · comments

hi, i'm a total newbie about atom and github...

i just added a few lines to block-comment.coffee so that it supports commenting blocks of shell scripts lines:

    ...
    else if extension is 'sh'
      commentStart = ''
      commentEnd = ''
    ...
    ...
    selectionText = selection.getText()

    if extension is 'sh'
      # add '# ' to the beginning of each line
      selectionText = selectionText.replace /^/, "# "
      selectionText = selectionText.replace /\n/g, "\n# "

nothing else, and works pretty good...

i've just sent my very first pull request...
hope you'll evaluate it!