Suppose I am interested in this directory: /home/username/../../../../.....dummy1

And dummy1 has these subfolders:


that in turn can consist of various directories and so on.

Is there anyway I can write an alias in ~/.cshrc to navigate to dummy1 and various subfolders ?

For example:

$ dummy1 sub_dummy1
$ dummy1 sub_dummy1/sub_sub_dummy1/sub_sub_sub_dummy2

Takes me to sub_dummy1 if I hit Enter, shows me contents of sub_dummy1 if I hit tab.

  • Doesn't tcsh have tab-completion? So cd dummy1/ {tab}, etc.
    – roaima
    May 2 '20 at 0:03
  • It is a standard behaviour in tcsh. Try to write cd dummy1/sub and then hit ctrl + d. Please read the section Completion and listing of man tcsh to understand how it works in details.
    – andcoz
    May 3 '20 at 17:44
  • @roima tcsh has had programmable completion since 1983. bash had it only in 2000 (in beta). ;-) I remember that, for me, it was a shock to discover that bash finally got it. Obviously default key bindings are different.
    – andcoz
    May 3 '20 at 17:55
  • Edited the question to make it more clearer. I am not interested in cd'ing to a directory then pressing tab to find out subfolders and so on. I am talking about having an alias which points to your directory of interest, typing that command without cd'ing to the directory and then hitting tab to see if a subfolder exists. I have already checked out 'Completion and Listing' section of tcsh. Duh ! Maybe I need to include a gif of some sort to explain things more clearly. May 3 '20 at 18:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.