Skip to content

CDPATH equivalent functionality for web terminal #86

@shivanshs9

Description

@shivanshs9

Having an easier way to navigate via the terminal to frequently-visited pages would be better for UX. For that, we could develop a similar functionality to CDPATH from zsh shell.
The gist of the approach is that if the given input doesn't match any command (outputs "Command not found."), then we could search for a directory with the given input as the name. If such a directory exists, then it should automatically perform the cd action with the given directory as an argument to cd, else command not found.
Since the terminal doesn't have support for env variables right now, the issue is broken down to two separate tasks.

Tasks:

  • Search for input directory name in the current directory.
  • Use the CDPATH env variable to search for the input directory name from the given directory paths in the variable

References:
https://jcode.me/cdpath-with-zsh/

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions