Hi,
I am a UNIX/Linux users since ten years back and I've been using the terminal (BASH) almost daily since then.
One thing that has always annoyed me is the lack of a command to move a file (
mv) to a directory and then immediately
cd (ie. change directory) to that same destination. This would be a very nifty command saving both my time and wrists!
Example:
Code:
arnold@computer:~/path$ mkdir newpath
arnold@computer:~/path$ touch newfile
arnold@computer:~/path$ mvcd newfile newpath
arnold@computer:~/path/newpath$
Now, from the little I know about BASH programming I could either write a script or use aliasing.
Using a script would not, as I see it, work because changing directory withing the script would only change current directory within the script and not outside in my terminal instance.
Writing an alias I am not sure would be possible unless some parameter magic can be done within the alias functionality.
Is there anyone who has got the slightest idea to take on this silly little quest?
Thanks Jens