Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I generally work a fair amount from the command line in order to launch vim, git, ssh and so on. However, I find the Finder's columnar view more natural for browsing through my files. Unfortunately, it's less natural for everything I want to do with the files.

What about the best of both worlds? Are there any popular command line programs / commands out there that deviate from the standard set by the venerable cd and ls for navigating and browsing files in the terminal? I'm sure people must have tried interesting ways of visualizing files, opening folders, etc.

share|improve this question

migrated from stackoverflow.com Jul 9 '11 at 22:10

This question came from our site for professional and enthusiast programmers.

    
I once patched bash. When you pressed tab you could select the dir/file from an ncurses dialog. for some tasks it was really great for others quite annoying. –  yi_H Jul 9 '11 at 20:45
add comment

4 Answers

Midnight Commander (mc) is one such tool that I'm aware of.

share|improve this answer
1  
Interesting. I just installed it with homebrew and it certainly is an alternative to cd and ls. I'll keep playing around with it; not sure if it's any more useful or natural. Thanks for the excellent answer. –  Gabe Durazo Jul 9 '11 at 21:13
    
+1 for installing it with Homebrew. Mac users: Just type "brew install mc" –  user72923 Jun 9 '12 at 16:55
add comment

I suggest you to look at:

  • readline setting completion-ignore-case (Off)

    If set to On, readline performs filename matching and completion in a case-insensitive fashion.

  • shopt -s autocd

    If set, a command name that is the name of a directory is executed as if it were the argument to the cd command. This option is only used by interactive shells.

  • shopt -s globstar

    This example will recursively find all csproj files in the current directory and subdirectories:

    git commit -m update -- **/*.csproj`
    
  • shell options extglob, and nocaseglob

    for obvious purposes, see man bash

  • the CDPATH variable

    cd [-L|-P] [dir]

      [...] The variable `CDPATH` defines the search path for the 
      directory containing dir. [...] If dir begins with a slash 
      (`/`), then `CDPATH` is not used
    
share|improve this answer
add comment

I think this is similar to this question at SO. If so, the most flexible option might be Big Cat and your own scripts. Sadly, the usual Big Cat URL is gone, so here's the archive.org version. No idea if it works in your preferred version of OS X.

share|improve this answer
add comment

If you're a vim fan, you might also check out vifm, which "is a ncurses based file manager with vi like keybindings. If you use vi, vifm gives you complete keyboard control over your files without having to learn a new set of commands."

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.