summaryrefslogtreecommitdiffstats
path: root/man/en/searchindex.js
blob: 559ed75bac724acc77a8ca921c634368d7e58ed4 (plain)
1
Object.assign(window.search, {"doc_urls":["chapter_1.html","chapter_2.html#installation","chapter_3.html#prerequisites","chapter_4.html#packages","chapter_5.html#pre-built-binaries","chapter_6.html#github-actions","chapter_7.html#release-rss-feed","chapter_8.html#nodejs-installation","chapter_9.html#backwards-compatibility","chapter_10.html#editor-support","chapter_11.html#vim-and-neovim","chapter_12.html#emacs","chapter_13.html#visual-studio-code","chapter_14.html#jetbrains-ides","chapter_15.html#kakoune","chapter_16.html#helix","chapter_17.html#sublime-text","chapter_18.html#micro","chapter_19.html#other-editors","chapter_20.html#quick-start","chapter_21.html#examples","chapter_22.html#features","chapter_23.html#the-default-recipe","chapter_24.html#listing-available-recipes","chapter_25.html#aliases","chapter_26.html#settings","chapter_27.html#documentation-comments","chapter_28.html#variables-and-substitution","chapter_29.html#strings","chapter_30.html#ignoring-errors","chapter_31.html#functions","chapter_32.html#recipe-attributes","chapter_33.html#command-evaluation-using-backticks","chapter_34.html#conditional-expressions","chapter_35.html#stopping-execution-with-error","chapter_36.html#setting-variables-from-the-command-line","chapter_37.html#getting-and-setting-environment-variables","chapter_38.html#recipe-parameters","chapter_39.html#running-recipes-at-the-end-of-a-recipe","chapter_40.html#running-recipes-in-the-middle-of-a-recipe","chapter_41.html#writing-recipes-in-other-languages","chapter_42.html#safer-bash-shebang-recipes","chapter_43.html#setting-variables-in-a-recipe","chapter_44.html#sharing-environment-variables-between-recipes","chapter_45.html#changing-the-working-directory-in-a-recipe","chapter_46.html#indentation","chapter_47.html#multi-line-constructs","chapter_48.html#command-line-options","chapter_49.html#private-recipes","chapter_50.html#quiet-recipes","chapter_51.html#selecting-recipes-to-run-with-an-interactive-chooser","chapter_52.html#invoking-justfiles-in-other-directories","chapter_53.html#imports","chapter_54.html#modules1190","chapter_55.html#hiding-justfiles","chapter_56.html#just-scripts","chapter_57.html#formatting-and-dumping-justfiles","chapter_58.html#fallback-to-parent-justfiles","chapter_59.html#avoiding-argument-splitting","chapter_60.html#configuring-the-shell","chapter_61.html#changelog","chapter_62.html#miscellanea","chapter_63.html#companion-tools","chapter_64.html#shell-alias","chapter_65.html#shell-completion-scripts","chapter_66.html#grammar","chapter_67.html#justsh","chapter_68.html#user-justfiles","chapter_69.html#nodejs-packagejson-script-compatibility","chapter_70.html#alternatives-and-prior-art","chapter_71.html#contributing","chapter_72.html#janus","chapter_73.html#minimum-supported-rust-version","chapter_74.html#new-releases","chapter_75.html#frequently-asked-questions","chapter_76.html#what-are-the-idiosyncrasies-of-make-that-just-avoids","chapter_77.html#whats-the-relationship-between-just-and-cargo-build-scripts","chapter_78.html#further-ramblings"],"index":{"documentStore":{"docInfo":{"0":{"body":140,"breadcrumbs":1,"title":1},"1":{"body":0,"breadcrumbs":3,"title":1},"10":{"body":81,"breadcrumbs":7,"title":2},"11":{"body":31,"breadcrumbs":5,"title":1},"12":{"body":25,"breadcrumbs":9,"title":3},"13":{"body":6,"breadcrumbs":7,"title":2},"14":{"body":9,"breadcrumbs":5,"title":1},"15":{"body":9,"breadcrumbs":5,"title":1},"16":{"body":6,"breadcrumbs":7,"title":2},"17":{"body":9,"breadcrumbs":5,"title":1},"18":{"body":12,"breadcrumbs":5,"title":1},"19":{"body":204,"breadcrumbs":5,"title":2},"2":{"body":85,"breadcrumbs":4,"title":1},"20":{"body":6,"breadcrumbs":3,"title":1},"21":{"body":0,"breadcrumbs":3,"title":1},"22":{"body":50,"breadcrumbs":6,"title":2},"23":{"body":139,"breadcrumbs":8,"title":3},"24":{"body":18,"breadcrumbs":4,"title":1},"25":{"body":578,"breadcrumbs":4,"title":1},"26":{"body":23,"breadcrumbs":6,"title":2},"27":{"body":134,"breadcrumbs":6,"title":2},"28":{"body":130,"breadcrumbs":4,"title":1},"29":{"body":32,"breadcrumbs":6,"title":2},"3":{"body":149,"breadcrumbs":4,"title":1},"30":{"body":659,"breadcrumbs":4,"title":1},"31":{"body":261,"breadcrumbs":6,"title":2},"32":{"body":55,"breadcrumbs":10,"title":4},"33":{"body":132,"breadcrumbs":6,"title":2},"34":{"body":24,"breadcrumbs":8,"title":3},"35":{"body":43,"breadcrumbs":10,"title":4},"36":{"body":97,"breadcrumbs":10,"title":4},"37":{"body":275,"breadcrumbs":6,"title":2},"38":{"body":49,"breadcrumbs":10,"title":4},"39":{"body":62,"breadcrumbs":10,"title":4},"4":{"body":110,"breadcrumbs":8,"title":3},"40":{"body":167,"breadcrumbs":8,"title":3},"41":{"body":143,"breadcrumbs":10,"title":4},"42":{"body":77,"breadcrumbs":8,"title":3},"43":{"body":46,"breadcrumbs":12,"title":5},"44":{"body":73,"breadcrumbs":10,"title":4},"45":{"body":85,"breadcrumbs":4,"title":1},"46":{"body":207,"breadcrumbs":8,"title":3},"47":{"body":40,"breadcrumbs":8,"title":3},"48":{"body":54,"breadcrumbs":6,"title":2},"49":{"body":146,"breadcrumbs":6,"title":2},"5":{"body":116,"breadcrumbs":6,"title":2},"50":{"body":95,"breadcrumbs":12,"title":5},"51":{"body":77,"breadcrumbs":8,"title":3},"52":{"body":87,"breadcrumbs":4,"title":1},"53":{"body":188,"breadcrumbs":4,"title":1},"54":{"body":9,"breadcrumbs":6,"title":2},"55":{"body":84,"breadcrumbs":4,"title":1},"56":{"body":78,"breadcrumbs":8,"title":3},"57":{"body":46,"breadcrumbs":8,"title":3},"58":{"body":147,"breadcrumbs":8,"title":3},"59":{"body":53,"breadcrumbs":6,"title":2},"6":{"body":5,"breadcrumbs":8,"title":3},"60":{"body":17,"breadcrumbs":3,"title":1},"61":{"body":0,"breadcrumbs":3,"title":1},"62":{"body":14,"breadcrumbs":6,"title":2},"63":{"body":38,"breadcrumbs":6,"title":2},"64":{"body":134,"breadcrumbs":8,"title":3},"65":{"body":6,"breadcrumbs":4,"title":1},"66":{"body":13,"breadcrumbs":4,"title":1},"67":{"body":124,"breadcrumbs":6,"title":2},"68":{"body":24,"breadcrumbs":10,"title":4},"69":{"body":89,"breadcrumbs":8,"title":3},"7":{"body":60,"breadcrumbs":6,"title":2},"70":{"body":16,"breadcrumbs":3,"title":1},"71":{"body":35,"breadcrumbs":4,"title":1},"72":{"body":13,"breadcrumbs":10,"title":4},"73":{"body":36,"breadcrumbs":6,"title":2},"74":{"body":0,"breadcrumbs":7,"title":3},"75":{"body":122,"breadcrumbs":10,"title":3},"76":{"body":53,"breadcrumbs":16,"title":6},"77":{"body":181,"breadcrumbs":5,"title":2},"8":{"body":77,"breadcrumbs":5,"title":2},"9":{"body":12,"breadcrumbs":5,"title":2}},"docs":{"0":{"body":"just just is a handy way to save and run project-specific commands. This readme is also available as a book . (中文文档在 这里 , 快看过来!) Commands, called recipes, are stored in a file called justfile with syntax inspired by make: screenshot You can then run them with just RECIPE: $ just test-all\ncc *.c -o main\n./test --all\nYay, all your tests passed! just has a ton of useful features, and many improvements over make: just is a command runner, not a build system, so it avoids much of make’s complexity and idiosyncrasies . No need for .PHONY recipes! Linux, MacOS, and Windows are supported with no additional dependencies. (Although if your system doesn’t have an sh, you’ll need to choose a different shell .) Errors are specific and informative, and syntax errors are reported along with their source context. Recipes can accept command line arguments . Wherever possible, errors are resolved statically. Unknown recipes and circular dependencies are reported before anything runs. just loads .env files , making it easy to populate environment variables. Recipes can be listed from the command line . Command line completion scripts are available for most popular shells . Recipes can be written in arbitrary languages , like Python or NodeJS. just can be invoked from any subdirectory, not just the directory that contains the justfile. And much more ! If you need help with just please feel free to open an issue or ping me on Discord . Feature requests and bug reports are always welcome!","breadcrumbs":"Introduction","id":"0","title":"Introduction"},"1":{"body":"","breadcrumbs":"Introduction » Installation » Installation","id":"1","title":"Installation"},"10":{"body":"vim-just The vim-just plugin provides syntax highlighting for justfiles. Install it with your favorite package manager, like Plug : call plug#begin() Plug 'NoahTheDuke/vim-just' call plug#end() Or with Vim’s built-in package support: mkdir -p ~/.vim/pack/vendor/start\ncd ~/.vim/pack/vendor/start\ngit clone https://github.com/NoahTheDuke/vim-just.git tree-sitter-just tree-sitter-just is an Nvim Treesitter plugin for Neovim. Makefile Syntax Highlighting Vim’s built-in makefile syntax highlighting isn’t perfect for justfiles, but it’s better than nothing. You can put the following in ~/.vim/filetype.vim: if exists(\"did_load_filetypes\") finish\nendif augroup filetypedetect au BufNewFile,BufRead justfile setf make\naugroup END Or add the following to an individual justfile to enable make mode on a per-file basis: # vim: set ft=make :","breadcrumbs":"Introduction » Editor Support » Vim and Neovim » Vim and Neovim","id":"10","title":"Vim and Neovim"},"11":{"body":"just-mode provides syntax highlighting and automatic indentation of justfiles. It is available on MELPA as just-mode . justl provides commands for executing and listing recipes. You can add the following to an individual justfile to enable make mode on a per-file basis: # Local Variables:\n# mode: makefile\n# End:","breadcrumbs":"Introduction » Editor Support » Emacs » Emacs","id":"11","title":"Emacs"},"12":{"body":"An extension for VS Code by skellock is available here ( repository ), but is no longer actively developed. You can install it from the command line by running: code --install-extension skellock.just An more recently active fork by sclu1034 is available here .","breadcrumbs":"Introduction » Editor Support » Visual Studio Code » Visual Studio Code","id":"12","title":"Visual Studio Code"},"13":{"body":"A plugin for JetBrains IDEs by linux_china is available here .","breadcrumbs":"Introduction » Editor Support » JetBrains IDEs » JetBrains IDEs","id":"13","title":"JetBrains IDEs"},"14":{"body":"Kakoune supports justfile syntax highlighting out of the box, thanks to TeddyDD.","breadcrumbs":"Introduction » Editor Support » Kakoune » Kakoune","id":"14","title":"Kakoune"},"15":{"body":"Helix supports justfile syntax highlighting out-of-the-box since version 23.05.","breadcrumbs":"Introduction » Editor Support » Helix » Helix","id":"15","title":"Helix"},"16":{"body":"The Just package by nk9 with just syntax and some other tools is available on PackageControl .","breadcrumbs":"Introduction » Editor Support » Sublime Text » Sublime Text","id":"16","title":"Sublime Text"},"17":{"body":"Micro supports Justfile syntax highlighting out of the box, thanks to tomodachi94 .","breadcrumbs":"Introduction » Editor Support » Micro » Micro","id":"17","title":"Micro"},"18":{"body":"Feel free to send me the commands necessary to get syntax highlighting working in your editor of choice so that I may include them here.","breadcrumbs":"Introduction » Editor Support » Other Editors » Other Editors","id":"18","title":"Other Editors"},"19":{"body":"See the installation section for how to install just on your computer. Try running just --version to make sure that it’s installed correctly. For an overview of the syntax, check out this cheatsheet . Once just is installed and working, create a file named justfile in the root of your project with the following contents: recipe-name: echo 'This is a recipe!' # this is a comment\nanother-recipe: @echo 'This is another recipe.' When you invoke just it looks for file justfile in the current directory and upwards, so you can invoke it from any subdirectory of your project. The search for a justfile is case insensitive, so any case, like Justfile, JUSTFILE, or JuStFiLe, will work. just will also look for files with the name .justfile, in case you’d like to hide a justfile. Running just with no arguments runs the first recipe in the justfile: $ just\necho 'This is a recipe!'\nThis is a recipe! One or more arguments specify the recipe(s) to run: $ just another-recipe\nThis is another recipe. just prints each command to standard error before running it, which is why echo 'This is a recipe!' was printed. This is suppressed for lines starting with @, which is why echo 'This is another recipe.' was not printed. Recipes stop running if a command fails. Here cargo publish will only run if cargo test succeeds: publish: cargo test # tests passed, time to publish! cargo publish Recipes can depend on other recipes. Here the test recipe depends on the build recipe, so build will run before test: build: cc main.c foo.c bar.c -o main test: build ./test sloc: @echo \"`wc -l *.c` lines of code\" $ just test\ncc main.c foo.c bar.c -o main\n./test\ntesting… all tests passed! Recipes without dependencies will run in the order they’re given on the command line: $ just build sloc\ncc main.c foo.c bar.c -o main\n1337 lines of code Dependencies will always run first, even if they are passed after a recipe that depends on them: $ just test build\ncc main.c foo.c bar.c -o main\n./test\ntesting… all tests passed!","breadcrumbs":"Introduction » Quick Start » Quick Start","id":"19","title":"Quick Start"},"2":{"body":"just should run on any system with a reasonable sh, including Linux, MacOS, and the BSDs. On Windows, just works with the sh provided by Git for Windows , GitHub Desktop , or Cygwin . If you’d rather not install sh, you can use the shell setting to use the shell of your choice. Like PowerShell: # use PowerShell instead of sh:\nset shell := [\"powershell.exe\", \"-c\"] hello: Write-Host \"Hello, world!\"