1. 18

  2. 6

    Why not direnv and add your scripts to the PATH or any similar solution?

    1. 2

      Interesting. I did not know that.

      What I like about ok is that the .ok file is useful even without the tool.

      1. 1

        I tried that back in 2016 and scripts in a directory didn’t apply properly, or were lost, if I navigated to a sub directory of the project … if I recall correctly, it’s been 3 years … :D

      2. 4

        I’m using make for this, but this might actually be a simpler solution.

        1. 1

          Author here, I choose this over make because:

          1. It’s less keystrokes to edit and use.
          2. The menu it outputs is more concise, and
          3. The barriers to mastery are low. Also: available on windows and bash (zsh almost supported… coming soon.)
          1. 1

            I resolved 1 with a shell alias and 3 was not an issue for me because I already know Make good enough.

            Point 2 is one of the reasons why I consider to write my own make-clone from time to time. :)

          2. 1

            Same. make is preinstalled anywhere that matters. Just pop a Makefile somewhere, and Bob’s your uncle.

          3. 1

            I created https://github.com/jpoehls/pwdtasks which does something quite similar - every time you cd it looks for a .powershell/tasks.psm1 module in the current directory and loads it if found. My use case was project specific helper functions. Similar to a .env file.

            It is PowerShell specific though and this .ok has some really cool aspects that I like. Particularly the menu of options.

            1. 1

              I did a similar technique back in 2016. But I wanted my “folder profile” (I called it project.sh) to be able to have some comments for the functions listed so I used GREP and SED to tear out a comment line next to my bash function names when listing out project related functions. Want a “hidden” function in your project, just omit a comment for the function.

              I also include a function to source relative files as I include other functions for the project lifecycle. An example top-level project.sh file is linked here https://gist.github.com/tenken/b1dcf1da05e8ed3a6a20f22e9ce35cc4

              I have since moved on over the years … and this years flavor is LANDO and using Containers. the .lando file supports additional scripts/functions that can be added to a container … so all in all its a more unified solution to spinning up project infrastructure and custom tooling than a basic bash approach https://github.com/lando/lando