{"id":16345388,"url":"https://github.com/unclechu/bashrc","last_synced_at":"2026-04-09T20:44:35.085Z","repository":{"id":12195229,"uuid":"14800141","full_name":"unclechu/bashrc","owner":"unclechu","description":"bash configs","archived":false,"fork":false,"pushed_at":"2025-01-14T08:41:22.000Z","size":326,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-14T09:44:23.310Z","etag":null,"topics":["bash","bashrc","dotfiles","perl","perl5","shell"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unclechu.png","metadata":{"files":{"readme":"README.md","changelog":"history-settings.bash","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-11-29T11:50:31.000Z","updated_at":"2025-01-14T08:41:25.000Z","dependencies_parsed_at":"2024-06-16T22:41:35.325Z","dependency_job_id":"95e1a686-d513-4518-b886-5156314a7577","html_url":"https://github.com/unclechu/bashrc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclechu%2Fbashrc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclechu%2Fbashrc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclechu%2Fbashrc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unclechu%2Fbashrc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unclechu","download_url":"https://codeload.github.com/unclechu/bashrc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239533066,"owners_count":19654617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","bashrc","dotfiles","perl","perl5","shell"],"created_at":"2024-10-11T00:31:23.255Z","updated_at":"2026-04-09T20:44:35.071Z","avatar_url":"https://github.com/unclechu.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# unclechu’s bash config\n\n## Usage\n\n### Nix\n\n#### Try it in a `nix-shell`\n\n``` sh\nnix-shell --run wenzels-bash\n```\n\n#### As a NixOS system dependency\n\n``` nix\n{ pkgs, ... }:\nlet\n  wenzels-bash = pkgs.callPackage (pkgs.fetchFromGitHub {\n    owner = \"unclechu\";\n    repo = \"bashrc\";\n    rev = \"ffffffffffffffffffffffffffffffffffffffff\"; # Git commit hash\n    sha256 = \"0000000000000000000000000000000000000000000000000000\";\n  }) {};\nin\n{\n  environment.shells         = [ wenzels-bash.wenzels-bash ];\n  environment.systemPackages = [ wenzels-bash.wenzels-bash ];\n  users.users.john.shell     =   wenzels-bash.wenzels-bash  ;\n}\n```\n\n##### Customizations\n\nSee the [misc/](misc) directory for setup scripts and aliases.\nYou could use `miscSetups` and `miscAliases` Nix attributes\nto add them to the final configuration. An example:\n\n``` nix\n{ pkgs, lib, ... }:\nlet\n  wenzels-bashrc-src = pkgs.fetchFromGitHub {\n    owner = \"unclechu\";\n    repo = \"bashrc\";\n    rev = \"ffffffffffffffffffffffffffffffffffffffff\"; # Git commit hash\n    sha256 = \"0000000000000000000000000000000000000000000000000000\";\n  };\n\n  skim-shell-scripts =\n    pkgs.callPackage\n      \"${wenzels-bashrc-src}/nix/integrations/skim-shell-scripts.nix\"\n      {};\n\n  wenzels-bash = pkgs.callPackage wenzels-bashrc-src {\n    miscSetups = dirEnvVarName: ''\n      . \"''$${dirEnvVarName}/misc/setups/fuzzy-finder.bash\"\n      . ${lib.escapeShellArg skim-shell-scripts}/completion.bash\n      . ${lib.escapeShellArg skim-shell-scripts}/key-bindings.bash\n      . \"''$${dirEnvVarName}/misc/setups/skim-fix.bash\"\n    '';\n\n    miscAliases = dirEnvVarName: ''\n      . \"''$${dirEnvVarName}/misc/aliases/skim.bash\"\n      . \"''$${dirEnvVarName}/misc/aliases/fuzzy-finder.bash\"\n      . \"''$${dirEnvVarName}/misc/aliases/tmux.bash\"\n      . \"''$${dirEnvVarName}/misc/aliases/gpg.bash\"\n    '';\n  };\nin\n{\n  environment.shells         = [ wenzels-bash.wenzels-bash ];\n  environment.systemPackages = [ wenzels-bash.wenzels-bash ];\n  users.users.john.shell     =   wenzels-bash.wenzels-bash  ;\n}\n```\n\n##### Use with my Neovim config\n\nSee https://github.com/unclechu/neovimrc\n\n``` nix\n{ pkgs, ... }:\nlet\n  wenzels-neovim-src = pkgs.fetchFromGitHub {\n    owner = \"unclechu\";\n    repo = \"neovimrc\";\n    rev = \"ffffffffffffffffffffffffffffffffffffffff\"; # Git commit hash\n    sha256 = \"0000000000000000000000000000000000000000000000000000\";\n  };\n\n  wenzels-neovim =\n    pkgs.callPackage \"${wenzels-neovim-src}/nix/apps/neovim.nix\" {\n      bashEnvFile = \"${wenzels-bash.dir}/.bash_aliases\";\n    };\n\n  wenzels-bash = pkgs.callPackage (pkgs.fetchFromGitHub {\n    owner = \"unclechu\";\n    repo = \"bashrc\";\n    rev = \"ffffffffffffffffffffffffffffffffffffffff\"; # Git commit hash\n    sha256 = \"0000000000000000000000000000000000000000000000000000\";\n  }) {};\nin\n{ environment.systemPackages = [ wenzels-bash.wenzels-bash wenzels-neovim ]; }\n```\n\n### Other GNU/Linux distributions\n\n1. Clone this repo:\n\n   ``` sh\n   git clone --recursive https://github.com/unclechu/bashrc.git ~/.config/bashrc\n   ```\n\n2. Create `~/.bashrc` with this content:\n\n   ``` sh\n   if [[ -z $PS1 ]]; then return; fi\n   . \"$HOME/.config/bashrc/.bashrc\"\n   ```\n\n3. Create `~/.bash_aliases` with this content:\n\n   ``` sh\n   . \"$HOME/.config/bashrc/.bash_aliases\"\n   ```\n\n#### Customizations\n\nSee the [misc/](misc) directory for setup scripts and aliases.\nYou could just import those scripts from `~/.bashrc` and `~/.bash_aliases`.\nHere is an example:\n\n- `~/.bashrc` file:\n\n  ``` sh\n  if [[ -z $PS1 ]]; then return; fi\n  . \"$HOME/.config/bashrc/.bashrc\"\n\n  . \"$HOME/.config/bashrc/misc/setups/fuzzy-finder.bash\"\n  . /path/to/skim/shell/completion.bash\n  . /path/to/skim/shell/key-bindings.bash\n  . \"$HOME/.config/bashrc/misc/setups/skim-fix.bash\"\n  ```\n\n- `~/.bash_aliases` file:\n\n  ``` sh\n  . \"$HOME/.config/bashrc/.bash_aliases\"\n\n  . \"$HOME/.config/bashrc/misc/aliases/skim.bash\"\n  . \"$HOME/.config/bashrc/misc/aliases/fuzzy-finder.bash\"\n  . \"$HOME/.config/bashrc/misc/aliases/tmux.bash\"\n  . \"$HOME/.config/bashrc/misc/aliases/gpg.bash\"\n  ```\n\n## Known issues\n\n### NixOS\n\nIn order to prevent loss of the command history this config uses different\nhistory file (by default `~/.wenzels_bash_history` instead of\n`~/.bash_history`).\n\nIf you want vanilla Bash sessions to use that history file don’t just override\n`HISTFILE` or you can loose some of your commands history due to smaller history\nsize in Bash defaults. Instead evaluate\n[history-settings.bash] in those Bash sessions. It will both override `HISTFILE`\nand other command history settings such history size.\n\nYou can use [Home Manager] in order to include [history-settings.bash] in your\n`~/.bashrc`. Like this in your `configuration.nix`:\n\n```nix\n{ pkgs, lib, ... }:\nlet\n  home-manager = fetchTarball {\n    # Branch: release-22.05\n    # Date: 2022-06-25\n    url = \"https://github.com/nix-community/home-manager/archive/4a3d01fb53f52ac83194081272795aa4612c2381.tar.gz\";\n    sha256 = \"0sdirpwqk61hnq8lvz4r2j60fxpcpwc8ffmicail2n4h6zifcn9n\";\n  };\n\n  wenzels-bash = pkgs.callPackage (pkgs.fetchFromGitHub {\n    owner = \"unclechu\";\n    repo = \"bashrc\";\n    rev = \"ffffffffffffffffffffffffffffffffffffffff\"; # Git commit hash\n    sha256 = \"0000000000000000000000000000000000000000000000000000\";\n  }) {};\nin\n{\n  imports = [\n    (import \"${home-manager}/nixos\")\n  ];\n\n  # … Other stuff in your \"configuration.nix\" …\n\n  home-manager.users.john.home.file.\".bashrc\".text = ''\n    . ${lib.escapeShellArg wenzels-bash.history-settings-file-path}\n  '';\n}\n```\n\n#### Entering `nix-shell`\n\nWhen you enter `nix-shell` is uses its default Bash session. If you want to\nenter some `nix-shell` and to keep your current `$SHELL` you can use `--command`\nin order to inherit your `$SHELL` inside new session:\n\n``` sh\nnix-shell -p hello --command 'export SHELL='\"'${SHELL//\\'}'\"' \u0026\u0026 \"$SHELL\"'\n```\n\nIn fact this Bash config provides `nsh` alias in [.bash_aliases] that does it\nfor you. So just replace `nix-shell` with `nsh` and your `$SHELL` is inherited.\n\n## Author\n\nViacheslav Lotsmanov\n\n## License\n\n[MIT] — For the code of this repository.\nSome third-party dependencies may have different licenses.\n\n[Home Manager]: https://github.com/rycee/home-manager\n\n[MIT]: LICENSE\n[history-settings.bash]: history-settings.bash\n[.bash_aliases]: .bash_aliases\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funclechu%2Fbashrc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funclechu%2Fbashrc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funclechu%2Fbashrc/lists"}