Giter Site home page Giter Site logo

Comments (2)

faho avatar faho commented on June 16, 2024 1

What this is saying is that $status is not a valid command. It is a variable.

What you want is to do something with that variable, like echo $status. There, echo is your command, and it'll print the value of the status variable.


The reason for the message here is that $status is often used by people like if $status = 0 - which isn't valid in a shellscripting language like fish (it also would not be valid in bash, for example) - you want if test $status = 0, which is why it sends to you the conditions help page.

(other variables can be used as a command - you can do $PAGER, if $PAGER is set to "less" for instance, but $status will only ever be a number and so we changed it so it heads off that mistake at the pass, but we didn't assume that anyone would just enter variables to get their value, which is simply not how a language like this works)

from fish-shell.

Dispersia avatar Dispersia commented on June 16, 2024

got it, that makes sense thanks. And ya, I have a bad habit of just doing $? and it just says 0 is not a command, but that's just a bad process on my side

from fish-shell.

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.