Skip to content

nyaosorg/nyagos

Repository files navigation

Build status GoDoc Go Report Card Github latest Releases

The Nihongo Yet Another GOing Shell

<English> / <Japanese>

NYAGOS - Nihongo Yet Another GOing Shell is a versatile command-line shell that blends bash-like command-line editing with seamless integration of Windows file system paths and batch files. It offers extensive customization through the Lua scripting language and supports modern predictive input features.

demo-animation

Key Features

UNIX-Like Shell Behavior

  • Keybindings
    • By default, keybindings are similar to Bash.
    • Customizable via Lua scripts in %USERPROFILE%\.nyagos.
      nyagos.key.c_u = "KILL_WHOLE_LINE"
    • Lua functions can be bound to keys:
      nyagos.key.escape = function(this) nyagos.exec("start vim.exe") end
  • History and Aliases
    • Supports Ctrl-P history search and !-style command recall.
    • Alias system similar to DOSKEY:
      nyagos.alias["g++"] = "g++.exe -std=gnu++17 $*"
    • Lua-powered aliases:
      nyagos.alias["lala"] = function(args) nyagos.exec("ls", "-al", unpack(args)) end
  • Custom Command Completion (Bash-Style Tab Completion)
    • Allows defining completions for specific commands.
      nyagos.complete_for["go"] = function(args)
          if #args == 2 then
              return { "bug", "doc", "fmt", "install", "run", "version",
                       "build", "env", "generate", "list", "test", "vet",
                       "clean", "fix", "get", "mod", "tool" }
          else
              return nil -- file completion
          end
      end
  • Predictive Completion (PowerShell 7-Like)
    • Suggests completions based on command history.
    • Predictions can be accepted using Ctrl-F or the right arrow key.

Windows Compatibility

  • Seamless Batch File Execution
    • Runs Windows batch files (.bat and .cmd) as if executed directly in CMD.exe.
    • Captures environment variable changes and directory switches made within batch files.
  • CMD.EXE-Like Features
    • Supports Windows path formats (C:\path\to\file).
    • Maintains a separate current directory for each drive.
    • Includes built-in equivalents for common DOS commands (copy, move, etc.).
    • No additional DLLs required, and no registry modifications.

Enhanced User Experience

  • Colorized Command-Line Interface
  • Unicode Support
    • Full compatibility with Windows Unicode APIs.
    • Supports pasting and editing of Unicode characters.
    • Special Unicode literals: %U+XXXX% and $Uxxxx for prompts.
  • Built-in ls Command
    • Supports colorized output (-o option).
    • Displays hard links, symbolic links, and junction targets.
  • Support SKK (Simple Kana Kanji conversion program) - Setup Guide

Supported Platforms

  • Windows 7, 8.1, 10, 11, Windows Server 2008 or later
  • Linux (experimental)

Video by @emisjerry

Install

Download Binary

Use "Scoop installer"

C:> scoop install nyagos

Use "Chocolatey installer"

C:> choco install nyagos

Contents

Release note

4.4.x / 4.3.x / 4.2.x / 4.1.x / 4.0.x

Documents

  1. Install
  2. Option for NYAGOS
  3. Editor
  4. Built-in commands
  5. What is done on the Startup
  6. Substitution
  7. Lua functions extenteded by NYAGOS
  8. Uninstall
  9. How To build
  10. How to setup SKK (since v4.4.14)

License

You can use, copy and modify under the New BSD License.

Acknowledgement

nocd5 / mattn / hattya / shiena / atotto / ironsand / kardianos / malys / pine613 / NSP-0123456 / hokorobi / amuramatsu / spiegel-im-spiegel / rururutan / hogewest / cagechi / Matsuyanagi / Shougo / orthographic-pedant / HABATA Katsuyuki / hisomura / tsuyoshicho / rane-hs / hami-jp / 3bch / AoiMoe / DeaR / gracix / orz-- / zkangaroo / maskedw / tyochiai / masamitsu-murase / hazychill / erw7 / tignear / crile / fushihara / ChiyosukeF / beepcap / tostos5963 / sambatriste / terepanda / Takmg / nu8 / tomato3713 / tGqmJHoJKqgK / juggler999 / zztkm / 8exBCYJi5ATL / ousttrue / kgasawa / HAYASHI-Masayuki / naoyaikeda / emisjerry

Author