Last active
December 26, 2017 20:07
-
-
Save niedzielski/ad2ac592bc9a83b7e33079a8f5a81ba6 to your computer and use it in GitHub Desktop.
Open the file manager GUI from the command line.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Open a file browser GUI in any directory. Add the following to your | |
| # .bashrc: | |
| case "$OSTYPE" in | |
| cygwin) gui() { explorer "${1:-.}"; } ;; | |
| linux-gnu) gui() { nautilus "${1:-.}"; } ;; | |
| darwin*) gui() { open "${1:-.}"; } ;; | |
| *) echo 'Unknown file manager.' >&2 ;; | |
| esac | |
| # Examples | |
| # Open the present working directory. | |
| # $ gui | |
| # Open the home directory. | |
| # $ gui ~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment