Skip to content

CAMEL-23226: Enhance Shell with alias persistence and init script support#22166

Open
gnodet wants to merge 3 commits intomainfrom
CAMEL-23226-shell-enhancements
Open

CAMEL-23226: Enhance Shell with alias persistence and init script support#22166
gnodet wants to merge 3 commits intomainfrom
CAMEL-23226-shell-enhancements

Conversation

@gnodet
Copy link
Contributor

@gnodet gnodet commented Mar 21, 2026

JIRA: CAMEL-23226

Summary

Builds on top of PR #22161 (JLine 4 shell migration) to add:

  • Alias persistence: Uses JLine's DefaultAliasManager with persistence file at ~/.camel-jbang-aliases, giving users alias/unalias commands to define shortcuts (e.g., alias ll="ls -la")
  • Init script support: Loads ~/.camel-jbang-init.jline on shell startup for custom configuration (aliases, variables, key bindings)
  • Tab completion improvements: JLine 4's native picocli integration provides better subcommand and option completion

Test plan

  • Run camel shell and verify alias/unalias commands work
  • Define an alias, exit shell, re-enter and verify alias persists
  • Create ~/.camel-jbang-init.jline with an alias and verify it loads on shell start

gnodet and others added 3 commits March 21, 2026 10:05
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add PosixCommandGroup (cd, ls, grep, cat, head, tail, etc.),
InteractiveCommandGroup (nano, less, ttop), and enable
script/variable commands for a richer shell experience.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…port

- Add DefaultAliasManager with persistence at ~/.camel-jbang-aliases
  for persistent alias/unalias commands
- Add init script support via ~/.camel-jbang-init file
- Remove scriptCommands(true) which requires a scriptRunner to function

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions bot added the dsl label Mar 21, 2026
@github-actions
Copy link
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using build-all, build-dependents, skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions
Copy link
Contributor

🧪 CI tested the following changed modules:

  • dsl/camel-jbang/camel-jbang-core
All tested modules (26 modules)
  • Camel :: Coverage
  • Camel :: Coverage [pom]
  • Camel :: JBang :: Core
  • Camel :: JBang :: Core [jar]
  • Camel :: JBang :: Integration tests
  • Camel :: JBang :: Integration tests [jar]
  • Camel :: JBang :: MCP
  • Camel :: JBang :: MCP [jar]
  • Camel :: JBang :: Main
  • Camel :: JBang :: Main [jar]
  • Camel :: JBang :: Plugin :: Edit
  • Camel :: JBang :: Plugin :: Edit [jar]
  • Camel :: JBang :: Plugin :: Generate
  • Camel :: JBang :: Plugin :: Generate [jar]
  • Camel :: JBang :: Plugin :: Kubernetes
  • Camel :: JBang :: Plugin :: Kubernetes [jar]
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: Route Parser [jar]
  • Camel :: JBang :: Plugin :: Testing
  • Camel :: JBang :: Plugin :: Testing [jar]
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: JBang :: Plugin :: Validate [jar]
  • Camel :: Launcher
  • Camel :: Launcher [jar]
  • Camel :: Launcher :: Container
  • Camel :: Launcher :: Container [pom]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant