Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: programs.bash.historyFile = "${config.xdg.dataHome}/bash/bash_history"; doesn't create the file #5351

Open
2 tasks done
mobsenpai opened this issue Apr 29, 2024 · 4 comments
Assignees
Labels
bug triage Issues or feature request that have not been triaged yet

Comments

@mobsenpai
Copy link

mobsenpai commented Apr 29, 2024

Are you following the right branch?

  • My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

Basically setting the bash history file location doesn't create the required files leaving bash with no history files to write the history into.

Maintainer CC

@rycee

System information

- system: `"x86_64-linux"`
 - host os: `Linux 6.1.86, NixOS, 23.11 (Tapir), 23.11.20240417.e402c3e`
 - multi-user?: `no`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `not found`
@mobsenpai mobsenpai added bug triage Issues or feature request that have not been triaged yet labels Apr 29, 2024
@mobsenpai mobsenpai changed the title bug: Setting programs.bash.historyFile = "${config.xdg.dataHome}/bash/bash_history"; doesn't change the location bug: Setting programs.bash.historyFile = "${config.xdg.dataHome}/bash/bash_history"; doesn't change the file location May 1, 2024
@sumnerevans
Copy link
Member

I feel like this is more of a limitation of bash than anything else. I couldn't find any documentation that says that it doesn't create the necessary subdirectories, but I also did not find any documentation saying that it does create the directories.

One workaround is that you could add a mkdir -p ${config.xdg.dataHome}/bash to your programs.bash.initExtra

@mobsenpai
Copy link
Author

That maybe so but that's just too hacky for me. Do you know how other users use it cuz it is an actual option in the home-manager?

@sumnerevans
Copy link
Member

It does look like others are using it in the same way that you are: https://github.com/search?utf8=%E2%9C%93&q=bash.historyFile&type=code

@mobsenpai mobsenpai changed the title bug: Setting programs.bash.historyFile = "${config.xdg.dataHome}/bash/bash_history"; doesn't change the file location bug: programs.bash.historyFile = "${config.xdg.dataHome}/bash/bash_history"; doesn't create the file May 4, 2024
@mobsenpai
Copy link
Author

I asked other repo owners and they also don't see the files created, but they were using other shells so it didnt matter. But this is clearly an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Issues or feature request that have not been triaged yet
Projects
None yet
Development

No branches or pull requests

4 participants