{"id":13894568,"url":"https://github.com/peterwvj/eshell-up","last_synced_at":"2025-10-25T00:04:14.352Z","repository":{"id":44360091,"uuid":"70950423","full_name":"peterwvj/eshell-up","owner":"peterwvj","description":"Quickly go to a specific parent directory in eshell","archived":false,"fork":false,"pushed_at":"2024-02-26T17:48:59.000Z","size":42,"stargazers_count":34,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-23T20:43:27.186Z","etag":null,"topics":["elisp","emacs","emacs-lisp","eshell","melpa"],"latest_commit_sha":null,"homepage":null,"language":"Emacs Lisp","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peterwvj.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-10-14T22:05:15.000Z","updated_at":"2025-02-05T03:20:05.000Z","dependencies_parsed_at":"2024-02-26T19:03:13.809Z","dependency_job_id":null,"html_url":"https://github.com/peterwvj/eshell-up","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterwvj%2Feshell-up","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterwvj%2Feshell-up/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterwvj%2Feshell-up/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterwvj%2Feshell-up/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterwvj","download_url":"https://codeload.github.com/peterwvj/eshell-up/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248089931,"owners_count":21045992,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elisp","emacs","emacs-lisp","eshell","melpa"],"created_at":"2024-08-06T18:01:38.130Z","updated_at":"2025-10-25T00:04:14.346Z","avatar_url":"https://github.com/peterwvj.png","language":"Emacs Lisp","funding_links":[],"categories":["Emacs Lisp"],"sub_categories":[],"readme":"#+STARTUP: showall\n\n#+TITLE: eshell-up.el\n\n[[https://melpa.org/#/eshell-up][file:https://melpa.org/packages/eshell-up-badge.svg]]\n[[https://stable.melpa.org/#/eshell-up][file:https://stable.melpa.org/packages/eshell-up-badge.svg]]\n[[https://travis-ci.org/peterwvj/eshell-up.svg?branch=master]]\n[[http://www.gnu.org/licenses/gpl-3.0.html][http://img.shields.io/:license-gpl3-blue.svg?style=flat-square]]\n\nEmacs package for quickly navigating to a specific parent directory in\n~eshell~ without having to repeatedly typing ~cd ..~.\n\n** Usage\n\nNavigating to a specific parent directory is achieved using the\n~eshell-up~ function, which can be bound to an ~eshell~ alias such as\n~up~.\n\n*** Examples\n\nTo demonstrate how to use ~eshell-up~ let's assume that the current\nworking directory of ~eshell~ is:\n\n#+BEGIN_SRC bash\n/home/user/first/second/third/fourth/fifth $\n#+END_SRC\n\nNow, in order to quicky go to (say) the directory named ~first~ one\nsimply executes:\n\n#+BEGIN_SRC bash\n/home/user/first/second/third/fourth/fifth $ up fi\n/home/user/first $\n#+END_SRC\n\nThis command searches the current path from right to left (while\nskipping the current directory, ~fifth~) for a directory that matches\nthe user's input (~fi~ in this case). If a match is found then\n~eshell~ changes to that directory, otherwise it does nothing. If, on\nthe other hand, no argument is passed to ~eshell-up~, this command\nsimply changes to the nearest parent directory (like ~cd ..~ does).\n\nIt is also possible to compute the matching parent directory without\nchanging to it. This is achieved using the ~eshell-up-peek~ function,\nwhich can be bound to an alias such as ~pk~.  When this function is\nused in combination with /subshells/ the matching parent directory can\nbe passed as an argument to other functions.  Returning to the\nprevious example one can (for example) list the contents of ~first~ by\nexecuting:\n\n#+BEGIN_SRC bash\n/home/user/first/second/third/fourth/fifth $ ls {pk fi}\n\u003cdirectory contents\u003e\n...\n#+END_SRC\n\n** Installation\n\n~eshell-up~ is available via [[https://github.com/melpa/melpa][MELPA]]. To add it to Emacs execute the\nfollowing:\n\n#+BEGIN_SRC elisp\npackage-install RET eshell-up RET\n#+END_SRC\n\nNow, put the following in your ~.emacs~ file:\n\n#+BEGIN_SRC elisp\n(require 'eshell-up)\n#+END_SRC\n\nIt is recommended to invoke ~eshell-up~ and ~eshell-up-peek~ using\naliases as done in the examples above.  To do that, add the following\nto your ~.eshell.aliases~ file:\n\n#+BEGIN_SRC\nalias up eshell-up $1\nalias pk eshell-up-peek $1\n#+END_SRC\n\n** Configuration (optional)\n\nTo make ~eshell-up~ searches case sensitive:\n\n#+BEGIN_SRC elisp\n(setq eshell-up-ignore-case nil)\n#+END_SRC\n\nTo print the matching parent directory before changing to it:\n\n#+BEGIN_SRC elisp\n(setq eshell-up-print-parent-dir t)\n#+END_SRC\n\n** Testing\n\nThe test are written using [[https://www.gnu.org/software/emacs/manual/ert.html][ERT]], and can be executed as follows:\n\n#+BEGIN_SRC elisp\nload-file eshell-up-tests.el\nert t\n#+END_SRC\n\nAlternatively, the tests can be run in batch mode:\n\n#+BEGIN_SRC bash\nemacs -Q --batch -L . -l ert -l eshell-up-tests.el -f ert-run-tests-batch-and-exit\n#+END_SRC\n\n** Credits\n\nThis package is inspired by [[https://github.com/vigneshwaranr/bd][bd]], which uses bash to implement similar\nfunctionality.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterwvj%2Feshell-up","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterwvj%2Feshell-up","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterwvj%2Feshell-up/lists"}