From 6a1522645e5ec0f3f81234ca776be8896a81bd42 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 17 Apr 2021 00:09:49 -0700 Subject: Proper history functionality via cd:- and cd:+ --- types.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'types.h') diff --git a/types.h b/types.h index 537c9a6..f6de043 100644 --- a/types.h +++ b/types.h @@ -53,13 +53,19 @@ typedef struct proc_s { } running; } proc_t; +// History of paths +typedef struct bb_history_s { + char path[PATH_MAX]; + struct bb_history_s *prev, *next; +} bb_history_t; + // Structure for bb program state: typedef struct bb_s { entry_t *hash[HASH_SIZE]; entry_t **files; entry_t *selected; char path[PATH_MAX]; - char prev_path[PATH_MAX]; + bb_history_t *history; int nfiles, nselected; int scroll, cursor; -- cgit v1.2.3