Giter Site home page Giter Site logo

Comments (3)

rtomayko avatar rtomayko commented on July 17, 2024

type is writing those error messages to stderr. It's working properly. I think stderr just needs to be redirected to /dev/null.

from hub.

blueyed avatar blueyed commented on July 17, 2024
  1. it will never work with zsh, where -t is not known:
    % type -t foo
    zsh: bad option: -t
  2. 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.

from hub.

defunkt avatar defunkt commented on July 17, 2024

Merged in 76081e5, thanks!

from hub.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.