Closed Samueru-sama closed 2 months ago
I think the default behavior should be like this:
if ! echo "$PATH" | grep ".local/bin"; then
function_to_patch
fi
Also do we have to patch the bashrc? I'm a zsh user, on zsh you only have to add $HOME/.local/bin
to zprofile
, adding it to zshrc
would cause $HOME/.local/bin
to repeat in PATH the second time you open a terminal window.
Also worth mentioning that adding $HOME/.local/bin
to PATH is job of the distribution as detailed in the XDG Base Dir specification:
So yeah I think we should just give a warning and ask the user if they want to patch their .profile
/.bash_profile
.
EDIT: I changed it instead to just patch if we detect that $HOME/.local/bin
isn't part of PATH.
@Samueru-sama I think you are absolutely right.
I would like to stop patching configuration files, and I would like to delegate everything to the README. It's not "AppMan" who should handle them.
I want to disable the function, or at least I would like an option that can solve the problems.
@Samueru-sama I think you are absolutely right.
I would like to stop patching configuration files, and I would like to delegate everything to the README. It's not "AppMan" who should handle them.
I want to disable the function, or at least I would like an option that can solve the problems.
In that case we simply issue a warning and ask if the user would like that appman patches their .bash_profile
or .profile
edit: adding the question part right now
@Samueru-sama we must go talk at https://github.com/ivan-hc/AM/pull/707
@rvenutolo let us know if this works for you.
This should work for me. Thanks very much.
I would love an option to have the
APP-MANAGER
script skip the function_patch_bashrc_and_profile
where the script writes the following to~/.bashrc
(and other dotfiles):Personally, I don't like anything touching my bash dotfiles and prefer to manage my
PATH
manually via my own dotfiles.Any option to disable that would be great. I don't know if you'd prefer an environment variable to control it like
[[ -z "${APPMAN_SKIP_PATCH_BASHRC_AND_PROFILE:-} ]] && _patch_bashrc_and_profile
or a value in theappman-config
config file.Unrelated to this, I just want to say I love
appman
. I had ignored AppImages due to the lack of a package management command line tool. Thank you so much for this. This plusAppImaGen
andArchImage
are great. I very much appreciate it.Originally posted by @rvenutolo in https://github.com/ivan-hc/AM/discussions/705