[
https://issues.apache.org/jira/browse/FELIX-2339?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Derek Baum resolved FELIX-2339.
-------------------------------
Resolution: Fixed
[felix-framework-2.0.4]$ ls bundle
org.apache.felix.gogo.felixcommands-0.9.0-SNAPSHOT.jar
org.apache.felix.gogo.runtime-0.5.0-SNAPSHOT.jar
org.apache.felix.gogo.shell-0.5.0-SNAPSHOT.jar
[felix-framework-2.0.4]$ java -jar bin/felix.jar
Welcome to Felix
================
_______________
Welcome to Gogo
Use 'type' to explore registered commands, 'type -?' for help.
// the above 'Welcome to Gogo' message was produced by the default gosh_profile
script, which is a resource in the shell bundle.
g! cat gosh_profile
# default gosh_profile
# only read if etc/gosh_profile doesn't exist relative to the System property
# gosh.home or failing that the current directory.
# ensure gogo commands are found first
SCOPE = gogo:*
# add methods on BundleContext object as commands
#addcommand context ${.context} (${.context} class)
# bug: above invokes (String, Object, String) instead of (String, Object, Class)
addcommand context ${.context}
# add methods on System object as commands
# FELIX-2335 prevents the use of (bundle 0) loadclass
addcommand system ((bundle 1) loadclass java.lang.System)
# alias to print full stack trace
e = { $exception printStackTrace }
## disable console auto-formatting of each result
# you will then need to explicitly use the 'format' command
# to print the result of commands that don't write to stdout.
#.Gogo.format = false
## disable printing the formatted result of a command into pipelines
#.Format.Pipe = false
# set prompt
prompt = 'g! '
# print welcome message
try {
cat ($0 resolve motd)
}
# end
// note how the welcome message was produced by: try {
cat ($0 resolve motd)
}
g! cat x.osh
echo hello derek
echo args: $args
echo script: $0
g! gosh x.osh a b c
hello derek
args: a b c
script: file:/Users/derek/Downloads/felix-framework-2.0.4/x.osh
g! type
basic:15
context:30
files:2
gogo:21
obr:6
osgi:2
system:28
true
g! type -s gogo
gogo:cat
gogo:each
gogo:echo
gogo:format
gogo:getopt
gogo:gosh
gogo:grep
gogo:if
gogo:new
gogo:not
gogo:set
gogo:sh
gogo:shutdown
gogo:source
gogo:tac
gogo:telnetd
gogo:throw
gogo:try
gogo:type
gogo:until
gogo:while
true
g!
> [gogo] add support for running scripts
> --------------------------------------
>
> Key: FELIX-2339
> URL: https://issues.apache.org/jira/browse/FELIX-2339
> Project: Felix
> Issue Type: Improvement
> Components: Gogo
> Reporter: Derek Baum
> Assignee: Derek Baum
> Fix For: gogo-0.6.0
>
>
> gogo should be able to run scripts from files, which control how it boots or
> do other tasks.
> something like:
> $ gosh script.osh arg1 arg2
> or
> $ source aliases.osh
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.