Save point good cd and history

This commit is contained in:
kake26 2025-04-13 21:54:16 -05:00
parent 36b840f0da
commit 3ddd822c15
Signed by: kake26
GPG key ID: E0A989B571D1F99F
3 changed files with 5 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
pshell_history.db

View file

@ -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;

View file