Steve Yegge
012bed1068
Fix GH#367: bd import defaulting to stdin is confusing
Changes:
1. Add TTY detection to bd import - prevents silent hang when run
interactively without arguments. Shows helpful usage message instead.
2. Fix misleading error messages - change "Run 'bd import'" to
"Run 'bd sync --import-only'" or explicit file path throughout.
Technical details:
- Added golang.org/x/term dependency for IsTerminal()
- When stdin is a TTY and no -i flag: show usage and exit
- When stdin is piped: works as before (supports script pipelines)
- Preserved all legitimate stdin uses:
* python gh2jsonl.py --repo owner/repo | bd import
* python md2jsonl.py feature.md | bd import
* git show HEAD:.beads/beads.jsonl | bd import -i /dev/stdin
Updated error messages in:
- cmd/bd/staleness.go - main "out of sync" error
- cmd/bd/sync.go - merge completion suggestions
- internal/rpc/server_export_import_auto.go - daemon warnings
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 11:15:34 -08:00
..
2025-11-20 20:45:39 -05:00
2025-11-21 23:34:22 -08:00
2025-11-21 14:57:18 -05:00
2025-11-06 20:14:34 -08:00
2025-11-21 23:34:22 -08:00
2025-11-21 14:57:18 -05:00
2025-11-06 20:14:34 -08:00
2025-11-21 14:57:18 -05:00
2025-11-07 21:02:38 -08:00
2025-11-17 10:12:46 -07:00
2025-11-20 19:04:42 -05:00
2025-11-23 11:15:34 -08:00
2025-11-23 10:57:29 -08:00
2025-11-22 18:17:19 -08:00
2025-11-21 14:57:18 -05:00
2025-11-06 20:00:08 -08:00
2025-11-19 05:54:28 -05:00
2025-11-20 20:39:23 -05:00