How do I get csh to add a trailing slash at the end of tab autocompletion?

eg: \stuff \otherstuff

now if I type cd s and press tab, I get: \stuff and not \stuff\

  • Are you using csh or tcsh? In tcsh there is the addsuffix option, which should actually be enabled by default. – Martin Tournoij Apr 30 at 19:57
  • @MartinTournoij The real csh does not have tab completion; when the filec variable is set, file competion is done with ESC (and ^D for listing multiple candidates). Anyways, it's not clear what the OP wants with all those backslashes. I've tried creating two files with spaces with touch 'a b C' 'a b D' and then ls a<tab> in tcsh will complete up to ls a\ b\ and list the 2 files as expected. – mosvy Apr 30 at 22:44
  • csh @mosvy eg are folders. The idea is to breeze through a directory tree by just entering the first character(s) [Tab] [Enter] first character(s)[Tab][Enter]. Currently I would need to type in / between the tab and enter – harryarchere May 1 at 17:14
  • What does set | grep -E 'shell|version|addsuffix|autoexpand' and ls -F in that directory show? (please do not answer in comments, but edit the info into your question) – mosvy May 2 at 0:22

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.