Hey,
How do you do this Zsh's "cd to any of the listed directories" feature in Bash?:
Because Bash doesn't like it:Code:cd (directory1|directory2)
Thanks for your time,Code:bash: syntax error near unexpected token `('
Intrepid Ibex
Hey,
How do you do this Zsh's "cd to any of the listed directories" feature in Bash?:
Because Bash doesn't like it:Code:cd (directory1|directory2)
Thanks for your time,Code:bash: syntax error near unexpected token `('
Intrepid Ibex
PC: Asus M5A87, AMD Phenom II X6 1090T, 10GB DDR III 1333MHz, Nvidia GTX560 Ti 1024M, Samsung SSD 830 Series 256GB, HDD 1 TB SATA II 7200RPM
OS: Arch 64-bit/Windows 8.1 Pro 64-bit
Other: KB: Logitech G110, M: Logitech G500, 100/10M Internet
Can you elaborate on the objective. If I knew the expected outcome I'm sure I'd understand better what it's not doing correctly.
-- L. James
--
L. D. James
ljames@apollo3.com
www.apollo3.com/~ljames
You have to enable extglob:
See: `man bash | less +/extglob'Code:shopt -s extglob cd @(directory1|directory2)
PC: Asus M5A87, AMD Phenom II X6 1090T, 10GB DDR III 1333MHz, Nvidia GTX560 Ti 1024M, Samsung SSD 830 Series 256GB, HDD 1 TB SATA II 7200RPM
OS: Arch 64-bit/Windows 8.1 Pro 64-bit
Other: KB: Logitech G110, M: Logitech G500, 100/10M Internet
Bookmarks