Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 3
    This method fails when the path to be removed is the only one in $PATH. Add if [ $PATH = $1 ]; then PATH=""; fi; Commented Mar 19, 2021 at 15:48
  • Very weird! Please explain what those embedded ()s do? Why is standard fun () {} notation not good enough? Commented Jan 6 at 20:30
  • 1
    If you remove the sub shell from the path_remove_test function @not2qubit, then it side effects the shell you're running the tests from, destroying its PATH, which is probably not what you want. *8') Commented Jan 9 at 10:54
  • 1
    I'm not sure what you're suggesting @amphetamachine, but hopefully my edit makes it more clear what the test function is doing. Commented Jan 9 at 10:59