{"id":16348569,"url":"https://github.com/theneikos/nsh","last_synced_at":"2026-05-02T05:40:30.673Z","repository":{"id":70729525,"uuid":"81825296","full_name":"TheNeikos/nsh","owner":"TheNeikos","description":"The Neikos Shell","archived":false,"fork":false,"pushed_at":"2022-07-26T07:32:44.000Z","size":18,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-28T09:27:27.238Z","etag":null,"topics":["rust","shell"],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheNeikos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-13T12:58:13.000Z","updated_at":"2022-07-26T07:32:45.000Z","dependencies_parsed_at":"2023-02-21T15:15:55.015Z","dependency_job_id":null,"html_url":"https://github.com/TheNeikos/nsh","commit_stats":{"total_commits":7,"total_committers":2,"mean_commits":3.5,"dds":0.1428571428571429,"last_synced_commit":"864329bdd3b26cf9ee3fea55c597b63cabdcfe7e"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheNeikos%2Fnsh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheNeikos%2Fnsh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheNeikos%2Fnsh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheNeikos%2Fnsh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheNeikos","download_url":"https://codeload.github.com/TheNeikos/nsh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239576791,"owners_count":19662114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["rust","shell"],"created_at":"2024-10-11T00:53:21.537Z","updated_at":"2025-11-10T02:30:18.541Z","avatar_url":"https://github.com/TheNeikos.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nsh\n## The Neikos Shell\n\nThis shell is for my personal use primarily. It is intended to run on my system, a linux environment.\nI do not promise any compatibility to other platforms.\n\n## Goals\n\n**Be fast and correct.**\n\nThat's it really, it should be usable too.\n\n## Syntax\n\nThe syntax is kept small and meant to be out of the way.\n\nThese constructs exist:\n\n- `for`:\n```\n    $ for var in $(seq 1 5) do\n        echo $var;\n      end\n```\n\n- `{ }`:\n```\n    $ [ $var = 1 ] \u0026\u0026 { \n        echo '$var is 1';\n        echo \"And the path is: $PATH\"\n    }\n```\n\n- `\u0026\u0026` and `||` for chaining\n- `|`, `\u003e` and `\u003c` for piping\n- `#` are line comments\n\n## Variables\n\n- Each shell has its own set of variables, they are accessed through the `%` prefix.\n- `\u003e $var` in command position will resolve the variable and call it's value\n- `\u003e $var = \u003cvalue\u003e` will set the value to the variable.\n- Variables are arrays, seperated by spaces\n- `\u003e $var = a b c d e f g` will be an array of 7 elements\n- `\u003e $var = \"a b c\" e f g` will be an array of 4 elements\n- `\u003e echo $var` will return the whole array\n- `\u003e echo $var[0]` will return the first element\n- `\u003e echo $var[-1]` will return the last element\n- `\u003e echo $var[10]` will not run and error instead\n- `\u003e echo $var[10]?` will return the 11th entry or empty string\n\n## Environment Variables\n\n- EnvVars are accessed through the `%` prefix.\n- `\u003e %var` resolves and substitutes the value and executes it\n- `\u003e %var = \u003cvalue\u003e` sets the value to the variable\n- `\u003e echo %var` substitutes the EnvVar\n- If the EnvVar does not exist, an empty string is substituted\n\n## Substitution\n\n- Substitution is done after expressions are formed\n- This means that substituting a command with spaces will not be split up\n- `\u003e command $variable #FOO`, here `command` will be called with two arguments which might have spaces themselves\n\n## Quotes\n\n- Both type of quotes work similarly, however, double quotes also substitute (and evaluate) any variables or subshells\n- Single quotes do not do substitution\n\n## Aliases\n\nAliases are done through executable files that are earlier in the path with the same name\n\n## Functions\n\nNo builtin functions, the idea is to be nimble, executables are pretty nimble\n\n## Autocomplete\n\nBasic autocomplete will exist for commands and from the current path\n\n## History\n\nThe history will be saved, unless started with the option to disable it\n\n## Suggestions\n\nHistory and path should be able to work together and suggest possible paths to be executed\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheneikos%2Fnsh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheneikos%2Fnsh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheneikos%2Fnsh/lists"}