Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andy5995/menucd
Directory browser and changer for the command line
https://github.com/andy5995/menucd
browser command-line command-line-tool dialog directories front-end scripts shell shell-script shellcheck-action utility
Last synced: 13 days ago
JSON representation
Directory browser and changer for the command line
- Host: GitHub
- URL: https://github.com/andy5995/menucd
- Owner: andy5995
- License: unlicense
- Created: 2023-01-31T19:52:54.000Z (almost 2 years ago)
- Default Branch: trunk
- Last Pushed: 2023-07-26T02:28:06.000Z (over 1 year ago)
- Last Synced: 2024-03-17T23:21:43.794Z (8 months ago)
- Topics: browser, command-line, command-line-tool, dialog, directories, front-end, scripts, shell, shell-script, shellcheck-action, utility
- Language: Shell
- Homepage:
- Size: 22.5 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog
- License: LICENSE
Awesome Lists containing this project
README
[![run shellcheck](https://github.com/andy5995/menucd/actions/workflows/shellcheck.yml/badge.svg)](https://github.com/andy5995/menucd/actions/workflows/shellcheck.yml)
# menucd
Directory browser and changer for the command line## Requirements
* [dialog](https://invisible-island.net/dialog/dialog.html)
Linux, unix, BSD, MacOS
This script probably won't work from the Windows command line unless you're
using WSL or some other modified command line environment.## Usage
Add this function to your environment by editing your ~/.profile, ~/.bashrc,
~/.zshrc, etc (change the path in the code below to match the path to where
the `menucd.sh` script is located):```sh
function menucd () {
$HOME/scripts/menucd.sh $@
ret=$?
if [ -r /tmp/menucd.cd.exit ]; then
cd "`cat /tmp/menucd.cd.exit`"
rm /tmp/menucd.cd.exit
elif [ $ret != 0 ]; then
echo Fail
fi
}
```Reload `~/.profile` (or whichever rc file you edited):
source ~/.profile
Then run `menucd`. If you run the script (`menucd.sh`) by itself, it won't work.