I'd like to have something like this - when I type "go", it would cd to a directory, fire "pwd" and "ls -a".
~ $ pwd
/home/ondra
~ $ go sketchbook
/home/ondra/sketchbook
. .. libraries
~ $ pwd
/home/ondra/sketchbook
~ $
First I tried with alias, it didn't work, now I have this, but it doesn't work either:
#!/bin/bash
cd $1
pwd
ls -a
It properly prints the info for the target directory, but does not change to it.
Looks like it works only within the script. Any way to do this?