Save point good cd and history
This commit is contained in:
parent
36b840f0da
commit
3ddd822c15
3 changed files with 5 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
pshell_history.db
|
|
@ -1,6 +1,7 @@
|
|||
package History::SQLite;
|
||||
|
||||
use DBI;
|
||||
use Cwd;
|
||||
|
||||
sub new {
|
||||
my ($class, %args) = @_;
|
||||
|
@ -9,6 +10,9 @@ sub new {
|
|||
db_path => $args{db_path} || 'command_history.db'
|
||||
}, $class;
|
||||
|
||||
# Convert to absolute path
|
||||
$self->{db_path} = getcwd() . '/' . $self->{db_path} unless $self->{db_path} =~ m|^/|;
|
||||
|
||||
$self->_init_db;
|
||||
|
||||
return $self;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue