You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
browse_command calls command, but that fails in both zsh and bash for me:
$ git browse
/home/user/bin/hub:648: command not found: type -t xdg-open
/home/user/bin/hub:648: command not found: type -t cygstart
Please set $BROWSER to a web launcher to use this command.
The same with zsh.
The fix appears to be using which instead, where I will provide a topic branch for in a moment.
The text was updated successfully, but these errors were encountered:
it will never work with zsh, where -t is not known:
% type -t foo
zsh: bad option: -t
It seems that with bash, the builtin type does not get properly handled with ````, unlike to when usingsystem: "command not found: type -t xdg-open" means that`type -t xdg-open`is being executed as command, and not`type`with`-t xdg-open`as command arguments.
I do not know why`which` is different (apparently it is a shell builtin, too), but it works.
Where have you tested this, bash I assume?
In zsh and bash (both via cygwin now):
% ruby -e 'type type'
-e:1: command not found: type type
When used in the shell directly:
% type type
type is a shell builtin
You're (partly) right about redirecting stderr though: this is required for which, but it should not be required for type: the command not found: type type error does not mean that type is not found, but that type type is not found (as a command).
I will add redirection to stderr to my topic branch.
browse_command
callscommand
, but that fails in both zsh and bash for me:$ git browse
/home/user/bin/hub:648: command not found: type -t xdg-open
/home/user/bin/hub:648: command not found: type -t cygstart
Please set $BROWSER to a web launcher to use this command.
The same with zsh.
The fix appears to be using
which
instead, where I will provide a topic branch for in a moment.The text was updated successfully, but these errors were encountered: