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: 8 months 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 3 years ago)
- Default Branch: trunk
- Last Pushed: 2023-07-26T02:28:06.000Z (over 2 years ago)
- Last Synced: 2025-03-26T11:22:29.996Z (9 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: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog
- License: LICENSE
Awesome Lists containing this project
- awesome-cli-apps-in-a-csv - menucd - Directory browser and changer for the command line. (<a name="cd"></a>Directory changers (alternatives to cd))
- awesome-cli-apps - menucd - Directory browser and changer for the command line. (<a name="cd"></a>Directory changers (alternatives to cd))
README
[](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.