viccherubini/get-shit-done

sed: illegal option -- -

Closed this issue · 0 comments

After installing get-shit-done, I received the following error when I tried "sudo get-shit-done play":

sed: illegal option -- -
usage: sed script [-Ealn] [-i extension] [file ...]
       sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]

The only thing I did differently from the suggested installation is that, rather than adding the get-shit-done directory to my path, I created an alias to it.

alias get-shit-done="~/environment/submodules/get-shit-done/get-shit-done.sh"

Using get-shit-done requires sudo, though, which required this additional addition to process aliases (https://wiki.archlinux.org/index.php/Sudo#Passing_aliases):

alias sudo='sudo '

I apologize if that's a red herring, but I wanted to note the difference in case it's relevant.

I was able to fix the error by changing line 112 of get-shit-done.sh:

OLD: sed --in-place -e "$sed_script" $file
NEW: sed -i -e "$sed_script" $file

Anyone have any insight on this? Do I have a different version of sed than the script expects?