Skip to content

grc.sh in newmaster branch breaks some stuff #253

@LFd3v

Description

@LFd3v

Hi, there.

Thank you for creating and maintaining grc.

When trying to use the newmaster branch I noticed that I could not start tmux anymore, it would always close with [exited]. After a long troubleshooting, I found the culprit: the command exit in L7 of the grc.sh file (added in 33942c1).

grc/grc.sh

Line 7 in 33942c1

[ -n "$BASH_VERSION" ] || exit 0

After changing it to return, like used elsewhere in the file, I could use tmux normally.

Just for the record, I also added some code to avoid creating aliases for command that do not exist, as well we including the old alias when creating the new one (this fixed a problem with ls not using color for the filenames).

    for name in ${cmds[@]}; do
        if command -v $name &>/dev/null; then
            if type $name | grep -q alias; then
                alias $name="colourify ${BASH_ALIASES[$name]}"
            else
                alias $name="colourify $name"
            fi
        fi
    done

Thanks again.

Regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions