News for hackers. Stuff that matters.
Re:So You Think You Know Git – Git Tips and Tricks by Scott ... by svieira on Wednesday February 14, 2024 @02:39PM (#39374184)
Well, this is fun:

    $ which git-foo
    $ type git-foo
    git-foo is /Users/my.user/.local/bin/git-foo

    $ git-foo --help
    Help output from git-foo

    $ GIT_TRACE=1 git foo
    14:26:18.849078 git.c:749               trace: exec: git-foo
    14:26:18.849815 run-command.c:657       trace: run_command: git-foo
    git: 'foo' is not a git command. See 'git --help'.
I can't say I've ever seen `which` and `type` disagree before ...

And today-I-learned that while bash expands `~` in PATH entries other programs do not. The fix was changing my PATH from:

    PATH=~/.local/bin:other:paths
to:

    PATH=$HOME/.local/bin:other:paths
Thanks so much for the help!

There are no comments on this comment yet.