You are not logged in.
Pages: 1
I keep my home-cooked bash scripts in a folder and added the path to .bashrc:
PATH="$PATH:/$HOME/scriptsSo now I can call those scripts from other directories, however the autocompletion is not working which would be useful.
Is it possible to make the entire content of the "scripts" folder available to bash autocompletion?
Cheers
Last edited by Der Chefkoch (2022-11-09 16:24:41)
Offline
bash completes executables out of the entire $PATH, but "PATH="$PATH:/$HOME/scripts" has a stray quotation mark and the leading "/" before $HOME should also not be there.
echo $PATHOffline
Thanks, well turns out everything is working I guess. "echo $PATH" properly displayed the path, the - correctly spotted - stray quotation mark just missed the ending quotation mark that I dropped during copy/paste.
I had the habit of calling the scripts via
sh scriptX.sh... where the autocompletion does not work after the sh-command. Since autocompletion works this way when the sh script is in the current working directory I assumed that should then work globally.
However, setting the .sh File to executable allows calling it via autocomplete.
Thx for the time
Offline
Pages: 1