I have web projects in /var/www/projects/some/long/path/strange-project-name
Now I want to type in terminal:
webs str{TAB}
It should autocomplete to the webs strange-project-name
(basing on ls /var/www/projects/some/long/path/
) and after executing the command, the pwd
should point to project path. Kind of smart cd strange-project-name
with autocomplete
How would you implement this feature? Some smart alias? Function in .bashrc
? Script?
Some smart alias?