Commit Graph
28 Commits
Author SHA1 Message Date
Paolo Ricciuti 2573ad73b4 feat: add shell login option (#75)
Closes #72
2026-07-30 22:45:23 +07:00
d73921e419 fix: stdin handling and exit command (#58)
### Summary of Changes
Fixes **#53** (*Fish shell integration panics with `inappropriate ioctl
for device`*).
#### 1. Fixed Non-TTY Stdin (`panic: inappropriate ioctl for device`) —
Fixes #53
- **Root Cause**: When executing `iris init fish | source` (or sourcing
shell configs), `os.Stdin` (FD 0) is connected to a pipe instead of a
TTY. Calling `term.MakeRaw()` on
a pipe returns `ENOTTY`.
- **Fix**: Guarded `term.MakeRaw()` with `term.IsTerminal()` checks
across `root/wrapper.go` and `root/root.go`. Added fallback to open and
use `/dev/tty` when `os.Stdin` is
  not a terminal device.
- **Fish IPC Hooks**: Added `fish_preexec` and `fish_postexec` event
handlers to `iris init fish` to send `IRIS_CMD_START` / `IRIS_CMD_STOP`
IPC signals over `$IRIS_FD`.
  
#### 2. Fixed Shell Setup Order (Duplicate `fastfetch` / startup
executions) — Fixes #53
- **Root Cause**: `iris setup` appended the init script to the bottom of
shell configs (`config.fish`, `.zshrc`, `.bashrc`), causing pre-existing
interactive startup commands
  to run twice.
- **Fix**: Updated `setupCmd` in `root/init.go` to **prepend** `# Iris
Autocomplete` to the top of shell configuration files.
  
#### 3. Fixed Terminal Exit Loop Handling — Relates to #50
- **Root Cause**: When typing `exit` in the wrapped shell, Linux PTY
returns `syscall.EIO` (`Input/output error`) on `ptmx.Read()` rather
than `io.EOF`. `runWrapper()` was
ignoring non-EOF errors and looping indefinitely without restoring the
terminal or calling `os.Exit(0)`.
- **Fix**: Updated the `ptmx.Read` error handler in `root/wrapper.go` to
handle `syscall.EIO` and exit cleanly.
  
   ---
  
  ### Issues Addressed
   - Closes #53
   - Relates to #50, #55
  
   ---
  
  ### Verification Tested
- [x] Verified `iris setup fish` / `iris init fish | source` initializes
without `ioctl` panic.
- [x] Verified typing `exit` in Fish, Zsh, and Bash terminates IRIS
cleanly and restores standard terminal state.
   - [x] Ran `go test ./...` — all tests pass.

---------

Co-authored-by: verse91 <versedev.store@proton.me>
Co-authored-by: VERSE <sunnyone0901@gmail.com>
2026-07-29 21:28:48 +07:00
VERSE 1e04949242 refactor: better project structure (#35)
This project is starting to grow, and I've seen flaws in the initial
project structure design
I think I'll restructure the entire project directory for better
scalability and also cleaner
2026-07-11 16:15:05 +07:00
VERSE f37f0681ce feat: better debugger (#13)
- create centralized structured logger with rotation
(https://github.com/versenilvis/IRIS/commit/96ad7c95ef0f7a9957b1bbf70bb6c8da3ce28b2e)
- update core lookup and utils to use new logger
(https://github.com/versenilvis/IRIS/commit/8b74b5a9cdc1828cff8c6d0bdaaccbe31da7a00a)
- add log startup metadata and propagate reload flags
(https://github.com/versenilvis/IRIS/commit/31208aa91a58e9e09abbf5497c314f5c961a58e2)
- add log key interceptions and pty events
(https://github.com/versenilvis/IRIS/commit/91ccb92835dd16ee70bf630fe0f267aad93c9db0)
- add test for logger 221a40c893b75e6215787163cd751a4c1cb6c1d8
- secure reload arguments file path to prevent symlink attacks
(https://github.com/versenilvis/IRIS/pull/13/commits/c3eabfda451230e52cb71f0c2a556687f839bd3f)
- close log file on reinitialization to prevent descriptor leak
(https://github.com/versenilvis/IRIS/pull/13/commits/a57d2c9be107a8c6200cf7046cc85b2f58667dce)
2026-07-01 20:09:38 +07:00
VERSE aca3d1670c fix: better suggestion and overlay movement on key presses (#12)
- support history suggestions for aliases
https://github.com/versenilvis/IRIS/commit/0ae25d05ce0faf8ff2eeee9aa3fbb5889d9ad511
- merge spec and history results
(https://github.com/versenilvis/IRIS/commit/315c94f12bb689ad6b39b1f0ce5e0bdef71f38d5)
- add 25ms pty throttle and optimize ctrl+l
(https://github.com/versenilvis/IRIS/commit/1e603d74c208be00f6b2cb79a628416455711c3a)
- align suggestion menu to col 1
(https://github.com/versenilvis/IRIS/commit/e307b210849af65276e93e1cff8895f3b54937ff)
- resolve zsh ipc fd mismatch and generate autocomplete hooks
(https://github.com/versenilvis/IRIS/pull/12/commits/2199607fad8122ec441ff4b99e562ca62bd948ff)
- fix: eliminate prompt duplication and freeze UI movement during menu
navigation
https://github.com/versenilvis/IRIS/pull/12/commits/6783989a49f0a68d01bad542588983a5c7b597a2
2026-07-01 16:11:38 +07:00
VERSE a2972f61f1 chore(commands): more commands for suggestions (#10)
## What's new
- color completion message command green
https://github.com/versenilvis/IRIS/pull/10/commits/6e141f5e6909fad1ec42725cce38d51729acf399
- new flat command folder structure
https://github.com/versenilvis/IRIS/pull/10/commits/87026a854a529ec5d5baed967d5f7a7f0085a24b
- fix some linter problems
https://github.com/versenilvis/IRIS/pull/10/commits/536de790cefda912f50bf4022e40ce2b965db2e2
- fix some gemini fix suggestions
2026-06-23 10:27:26 +07:00
VERSE 3d76a3ee88 feat: toml config support (#9)
## What's new
- TOML config support 
- add config init command to justfile
https://github.com/versenilvis/IRIS/pull/9/commits/a5bb6c23d74ca73385b3590d2eb275ce6429906b
- add copy binary file to local bin on reload
https://github.com/versenilvis/IRIS/pull/9/commits/4da3acdbc58c28f20fa0021d15fec82823ba392b
- init config on setup
https://github.com/versenilvis/IRIS/pull/9/commits/fb48b6bb832f38e24fab9211d92858bab9a58a07

## Fix
- add lsof to support macos because /proc filesystem is Linux-specific
and does not exist on macOS 0439d829573864fcf902fc4127f7d45384bfab01
- git push doesnt suggest current branch, fix
https://github.com/versenilvis/IRIS/pull/9/commits/b498532b401b764a4a1a2c70b3cb44b7caf72320
- use timeout context for lsof command in reload handler
https://github.com/versenilvis/IRIS/pull/9/commits/1a2baee951e6538a729da12aedfe53960e51102d
2026-05-30 22:05:06 +07:00
VERSE bf67e50ea6 Feat: crash log (#7)
Merged #6
- crash log (db0e1be9a02f70927124f9f3563df5e9dee3a764)
- perf(watchdog): limit buffer size and optimize crash substring search (https://github.com/versenilvis/IRIS/pull/7/commits/7725434fedf8b32929dc0d71e1256fda13cfdfca)
- refactor(crash): use dynamic buffer for stack trace capture (https://github.com/versenilvis/IRIS/pull/7/commits/07809a4330a1236471e8dae0e83afd4323a4c83a)
2026-05-23 23:32:36 +07:00
verse91 c76541258a fix: all issues by golangci-lint 2026-05-09 23:49:33 +07:00
verse91 5c8ac9e4a6 feat: run with terminal 2026-04-19 12:45:20 +07:00
verse91 db8b6ec91b refactor(root): seperate into small files 2026-04-16 00:05:49 +07:00
verse91 887b5af958 feat(root): stop showing suggestion when delete entire line 2026-04-14 12:22:36 +07:00
verse91 7a9c28e6f6 feat(shortcut): shift tab to toggle menu 2026-04-14 12:17:42 +07:00
verse91 fc21a6b0cc fix: iris keep suggesting when press tab continually 2026-04-14 12:12:07 +07:00
verse91 2c01b2259e fix(root): now kill all child processes
- I got a problem with kitty image protocol
2026-04-12 00:00:40 +07:00
verse91 f306566602 fix(root): ctrl R open reverse search instead of switching to history 2026-04-11 23:56:36 +07:00
verse91 11225df6c8 fix(root): eliminate child shell leakage and terminal corruption on reload 2026-04-11 23:54:11 +07:00
verse91 8dff68601e fix(root): print reloading 2026-04-11 23:38:26 +07:00
verse91 ccbf59201a fix(root): return last shell insteadd of default shell on reload 2026-04-11 23:35:01 +07:00
verse91 736723fbe8 refactor: shell adaptor 2026-04-11 22:34:04 +07:00
verse91 bed9c98747 fix: iris now reloads via signal handoff 2026-04-11 22:12:15 +07:00
verse91 78e19199b0 feat: in-place reloading on current TTY 2026-04-11 21:53:37 +07:00
verse91 6fd6a8e7a2 chore(root): use PID 2026-04-09 23:48:30 +07:00
verse91 f4816d2b5f feat(commands): refactor and add more commands 2026-04-09 23:30:16 +07:00
verse91 1a4a9079a3 chore(integration): fix typo of folder name 2026-04-09 16:09:38 +07:00
verse91 61f05a4c82 fix(iris): continue to suggest command after tab 2026-04-09 15:56:24 +07:00
verse91 afa3c28a88 fix(iris): hide history when delete whole line 2026-04-09 15:35:17 +07:00
verse91 1fb279e588 feat(root): iris command 2026-04-09 15:05:36 +07:00