Here we define some of the terms used on this page and throughout the rest of the fish documentation:Īrgument: A parameter given to a command. So the basic idea of fish is the same as with other unix shells: It gets a commandline, runs expansions, and the result is then run as a command. Try man your-command-here to get information on your command’s switches. For example, -help will usually display a help text, -version will usually display the command version, and -i will often turn on interactive prompting before taking action. There are some switches, however, that are common to most commands. Switches differ between commands and are usually documented on a command’s manual page. By using the -l switch, the behavior of ls is changed to not only display the filename, but also the size, permissions, owner, and modification time of each file. For example, the ls command usually lists the names of all files and directories in the current working directory. Switches almost always start with one or more hyphens - and alter the way a command operates. Multiple commands can be written on the same line by separating them with semicolons.Ī switch is a very common special type of argument. Every command ends with either a newline (by pressing the return key) or a semicolon. Open: Open files with the default application associated with each filetypeĬommands and arguments are separated by the space character ' '. Man: Display a manual page - try man ls to get help on your “ls” command, or man mv to get information about “mv”. Otherwise the whole filename, including the directory (like /home/me/code/checkers/checkers or. If the program file is located in one of the PATH directories, you can just type the name of the program to use it. All of these commands follow the same basic syntax.Įvery program on your computer can be used as a command in fish. There are commands for repeating other commands, commands for assigning variables, commands for treating a group of commands as a single command, etc. In this example the output is hello world.Įverything in fish is done with commands. Echo command writes its arguments to the screen.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |