[
https://issues.apache.org/jira/browse/KARAF-1381?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17610123#comment-17610123
]
ASF GitHub Bot commented on KARAF-1381:
---------------------------------------
awrb commented on code in PR #1628:
URL: https://github.com/apache/karaf/pull/1628#discussion_r981391982
##########
shell/core/src/main/java/org/apache/karaf/shell/impl/console/ConsoleSessionImpl.java:
##########
@@ -299,7 +299,9 @@ public Object evaluate(LineReader reader, ParsedLine line,
String func) throws E
* @return the history file
*/
protected Path getHistoryFile() {
- String defaultHistoryPath = new File(System.getProperty("user.home"),
".karaf/karaf.history").toString();
+ String instanceName = System.getProperty("karaf.name", "root");
Review Comment:
Done, it will stay `karaf.history` now!
> Use a history file per instance when possible
> ---------------------------------------------
>
> Key: KARAF-1381
> URL: https://issues.apache.org/jira/browse/KARAF-1381
> Project: Karaf
> Issue Type: New Feature
> Components: karaf
> Reporter: Jean-Baptiste Onofré
> Priority: Major
>
> Currently, all instances launched with the same system user share the same
> history file ($USER/.karaf/history), so we got the commands runned on another
> instance.
> A workaround is to use -Dkaraf.history property to use a history file
> specific to each instance. However, the user has to change the startup
> configuration to add this property.
> When the instances are clearly identified (root, foobar, other, etc), Karaf
> could store the history file in a dedicated location by default, for instance:
> $USER/.karaf/history.root
> $USER/.karaf/history.foobar
> $USER/.karaf/history.other
--
This message was sent by Atlassian Jira
(v8.20.10#820010)