Closed roddhjav closed 3 years ago
Unfortunately, command -v
is not a replacement for which
. Please note the differences for shell builtins and aliases:
$ alias ls='ls --color=auto'
$ which ls
/usr/bin/ls
$ command -v ls
alias ls='ls --color=auto'
A better option is to convert otp.bash
to a template and make these paths configurable via the makefile. Going to close and open an issue for this.
Unfortunately,
command -v
is not a replacement forwhich
. Please note the differences for shell builtins and aliases:
Just wanted to let people know that bash aliases are not used by default when using command -v
inside scripts
Here's a simple snippet to confirm this on your system assuming ls
is an alias
#!/bin/bash
command -v ls
This should still output something like /usr/sbin/ls
and not the alias. I've closed https://github.com/tadfisher/pass-otp/pull/159 but I don't see how using command -v
could cause issues.
Hi @tadfisher
This PR replaces the use of
which
by the builtin shellcommand
. That allow to not requirewhich
as an extra dependency.See #115