Closed golimarrrr closed 1 year ago
Yes, the script can be fully separated from the login shell, but that would require more code that finds where every executable is located. Relying on the login shell means that, in general, the script doesn't have to locate wget
or unzip
and so on. Complete separation would have the script looking in /bin
, /usr/bin
, /usr/local/bin
and so on, and prompting the user for the location of an executables on failure to locate it.
The easiest way to exclude the script commands from zsh history is to run it explicitly with the shell command: zsh -i macos-guest-virtualbox.sh
or non-interactively zsh macos-guest-virtualbox.sh
This would prevent the script commands from being added to the login shell's history. bash by default excludes the script commands from the login shell history.
Ok, for bash I guess that running HISTFILE=/dev/null
before running the script would work
Possibly related to https://github.com/myspaghetti/macos-virtualbox/issues/638
After running the script, there are a lot of commands from macos-guest-virtualbox.sh inside the bash history. This makes sense, but they seem to include some control characters that break the Ctrl+R functionality (reverse-i-search) of bash, because if after using
mycommand
I do:CTRL+R mycommand
it does not find any line, butgrep mycommand ~/.bash_history
does find itIs there a way to run the script totally separately from the main shell that the user opens for other tasks?