{"id":19110118,"url":"https://github.com/laluxx/rsh","last_synced_at":"2026-04-16T11:02:54.725Z","repository":{"id":209803473,"uuid":"724765122","full_name":"laluxx/rsh","owner":"laluxx","description":"a crystal shell","archived":false,"fork":false,"pushed_at":"2023-11-30T07:13:42.000Z","size":567,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-14T08:52:46.847Z","etag":null,"topics":["ruby","shell"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laluxx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-11-28T18:45:50.000Z","updated_at":"2024-08-10T19:04:31.000Z","dependencies_parsed_at":"2024-11-09T04:24:59.961Z","dependency_job_id":"f91b7152-815e-4c75-96d9-7deb14191661","html_url":"https://github.com/laluxx/rsh","commit_stats":null,"previous_names":["laluxx/rsh"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/laluxx/rsh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laluxx%2Frsh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laluxx%2Frsh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laluxx%2Frsh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laluxx%2Frsh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laluxx","download_url":"https://codeload.github.com/laluxx/rsh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laluxx%2Frsh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31882886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T09:23:21.276Z","status":"ssl_error","status_checked_at":"2026-04-16T09:23:15.028Z","response_time":69,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ruby","shell"],"created_at":"2024-11-09T04:23:41.852Z","updated_at":"2026-04-16T11:02:54.709Z","avatar_url":"https://github.com/laluxx.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TODO\n\n## Evil mode\n- [ ] it takes 2 keystrokes to go in NORMAL mode\n- [ ] keychords in normal mode\n- [x] cursor color change based on mode (and stay a block)\n\n## General\n- [ ] Ctrl-backspace delete all to the left \n- [ ] Dont depend on pywal, simply grab the first 16 colors somehow\n- [ ] Kill existing rsh process when spawning a new one from rsh or probably we should kill any other shell idk the standard\n- [ ] `cd rsh \u0026\u0026 ls` DONT work for some reason\n- [ ] `2+2` should print automatically without even pressing RET (like node)\n- [ ] Better prompt show git info and cool icons (like starship)\n- [ ] Syntax highlighting for ruby \u0026 Commands red for non existing and green for existing\n- [ ] make loops possible by writing a new line instead of immediate execution (like xonsh)\n- [ ] Cool stuff like `p = pwd`\n- [ ] aliases and functions should be in `~/.config/rsh/config.rb`\n- [x] Ctrl-z should not kill the shell\n\n## Functions\n- [ ] while this file doesnt exist do\n- [ ] while this file exist do\n- [ ] for 10 do\n- [ ] for 3 seconds do?\n- [ ] for a do\n- [ ] function to add permanent functions\n- [ ] function to add permanent aliases \n\n## Done\n- [x] Aliases\n- [x] Functions\n- [x] Keybinds like ctrl+l up arrow down arrow\n- [x] Prompt color based on success or fail\n\n\n\n# Old version\ntoo high level\n```ruby\nrequire 'readline'\n# History\nHISTORY_FILE = File.expand_path('~/.config/rsh/history')\nFileUtils.mkdir_p(File.dirname(HISTORY_FILE))\nReadline::HISTORY.push(*File.readlines(HISTORY_FILE).map(\u0026:chomp))\n\n# Tab Completion\nReadline.completion_proc = proc do |s|\n  Dir[\"#{s}*\"].grep(/^#{Regexp.escape(s)}/)\nend\n\nlast_command_success = nil\n# Main loop\nbegin\n  puts \"Welcome to the crystal shell - Type 'exit' to quit.\"\n\n  Signal.trap(\"SIGINT\") do\n    last_command_success = true\n    Readline.point = 0\n    Readline.delete_text\n    Readline.redisplay\n    puts \"\\n\"\n    print \"#{RESET_COLOR}❯ \"\n  end\n\n  while input = Readline.readline(\"#{last_command_success.nil? ? '' : (last_command_success ? GREEN : RED)}❯ #{RESET_COLOR}\", false)\n    break if input.nil? || input == \"exit\"\n\n    # Remove duplicates and add non-empty commands to history manually\n    unless input.strip.empty?\n      # Run the command and update the success status\n      last_command_success = run_command(input, aliases, functions)\n      Readline::HISTORY.pop if Readline::HISTORY.length \u003e 0 \u0026\u0026 Readline::HISTORY[-1] == input\n      Readline::HISTORY.push(input)\n    end\n  end\nensure\n  # Save the history when exiting\n  File.open(HISTORY_FILE, 'w') do |file|\n    Readline::HISTORY.to_a.last(100).each { |cmd| file.puts(cmd) }\n  end\nend\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaluxx%2Frsh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaluxx%2Frsh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaluxx%2Frsh/lists"}