I know that exists a previous question about this subject. But a moderator has delete my question in these thread, for this reason I ask here the same.
In my .bashrc I try with:
alias cl='$HOME/.cFolder.sh'
The content of .cFolder.sh
is:
#!/bin/bash
cFolder() {
cd $1 && pwd && ls;
}
cFolder $1
When I execute my new alias I get this:
jonathan ~ $ cl Documentos/myScripts/ /home/jonathan/Documentos/myScripts arranque-fallido.log firstInstall.sh makeAllPacks.sh ORIGINAL-installPegaso.sh restoreBackup.sh startInitialConfig.sh configure-usb-install.sh fixDatabase.sh makeInstallationPack.sh README.md restoreData.sh testZenity.sh downloadDebs.sh installAppPack.sh myScripts-Functions.sh recoverSystem.sh setNetwork.sh updateWeb.sh jonathan ~ $
The list of files is correct. But it doesn't change my actual folder. The .cFolder.sh script runs in his own space.
The option:
alias cl='cFolder() { cd $1 && pwd && ls; }'
doesn't work for me. How can I fix this?