Skip to content

Managing shell complexity #68

@mcandre

Description

@mcandre

Shell scripting is not for the faint of heart. For example, .profile tends to be ignored by many different shell contexts. A decent flowchart is available from Shreevatsa:

https://shreevatsa.wordpress.com/2008/03/30/zshbash-startup-files-loading-order-bashrc-zshrc-etc/

I am not of a solid default could exist for the bash configuration path. .bashrc is better, though people often get confused about .bash_profile, and then there is also /etc/profile. And that's just for bash, it gets even crazier for other shells.

Additionally, inlining script contents is inadvisable as it makes it far more difficult to lint and syntax check shell scripts, compared to separate files... you probably want to run some basic ShellCheck commands for any /root configurations, since these will be running at high privilege.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions