Skip to content

Pin 'active' notebook making it easier to run multiple commands on that notebook #34

@haroldcampbell

Description

@haroldcampbell

Problem

When I was working on a notebook, I have to provide the same path multiple times. This is tedious, if I'm working on the same notebook.

Proposal

Allow a user to pin one notebook per "project" so repeated commands can target that notebook without requiring the notebook path each time.

This should be a project-scoped (.e.g folder containing the .jupyter foler) setting stored alongside the existing CLI config in ./.jupyter/cli.json.

Changes to manage pinning path

  • Add a top-level nb pin <path> command to set the pinned notebook.
  • Add nb pin --clear to remove the pinned notebook.
  • Add nb pin with no arguments to show the current pinned notebook.

Changes need for path commands

Allow these existing commands to omit <path> when a notebook is pinned:

  • nb read
  • nb view
  • nb execute
  • nb cell add
  • nb cell update
  • nb cell delete
  • nb output clear

Other consideration

I'm unsure how this would work with the nb search <path> <pattern>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions