[RFC]: add support for bookmarking directories in REPL #2062
Labels
difficulty: 3
Likely to be challenging but manageable.
Enhancement
Issue or pull request for enhancing existing functionality.
JavaScript
Issue involves or relates to JavaScript.
Needs Discussion
Needs further discussion.
priority: Normal
Normal priority concern or feature request.
REPL
Issue or pull request specific to the project REPL.
RFC
Request for comments. Feature requests and proposed changes.
Description
This RFC proposes adding support in the REPL for bookmarking directories. Currently, in order to move around the file system, one needs to manually set the current working directory. This can be tedious, as one needs to manually type file paths, either relative or absolute, in order to walk to the desired directory.
This RFC proposes alleviating that tedium by adding support for "bookmarking" directories. E.g.,
We'd want to add a set of complementary APIs:
saveBookmark( name[, path ] )
: path default is the current working directoryloadBookmark( name )
: set current working directory to the path associated withname
deleteBookmark( name )
: delete the bookmark associated withname
renameBookmark( prev, name )
: renames a bookmark specified byprev
to the name specified byname
isBookmark( [path] )
: returns a boolean indicating if a specified path has been bookmarked (if no path provided, uses the current working directory as the path)By default, bookmarks would only last for the REPL session. To support persisting benchmarks and loading previously persisted benchmarks, we could add the following APIs:
loadBookmarks( file )
: loads bookmarks found in the file specified byfile
saveBookmarks( file )
: saves the current set of bookmarks to a file specified byfile
clearBookmarks()
: clears all current bookmarks in the current REPL sessionbookmarks()
: list all bookmarks in the current REPL sessionThe ability to dynamically load and remove bookmarks would allow users to quickly switch development contexts, similar to how the REPL's concept of workspaces allows for moving being variable contexts.
Related Issues
No.
Questions
Other
Checklist
RFC:
.The text was updated successfully, but these errors were encountered: