[ https://issues.apache.org/jira/browse/FELIX-2396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12877032#action_12877032 ]
Derek Baum commented on FELIX-2396: ----------------------------------- or use closures: Object getAndEvaluate(String name) { Object value = session.get(name); if (value instanceof Function) { try { value = ((Function) value).execute(session, null); } catch (Throwable e) { // ignore } } return value; } e.g. prompt = getAndEvaluate("prompt"); will work with a simple prompt = "g! " or a closure: prompt = { (pwd; echo '% ') | tac} which will change the prompt in line with the current directory. > Ability to have callbacks when accessing session variables > ---------------------------------------------------------- > > Key: FELIX-2396 > URL: https://issues.apache.org/jira/browse/FELIX-2396 > Project: Felix > Issue Type: Improvement > Components: Gogo > Reporter: Guillaume Nodet > > This is required for a better integration when the value is computed without > any simple way to be aware of the fact that the value has changed. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.