one.bash + one.share = an awesome shell.
one.share is the one.bash official repo, which provides common aliases, completions, plugins, configs, bin, sub for one.bash.
- Collections of shell commands, which locates in
bin/
. - My best practices with shell (bash).
- Responsive and pretty prompt. Refer to Preview.
- Extended keyboard bindings. See ./plugins/keymap.bash.
- Flexible completion. Tab and Shift+Tab to make completion in circle. Compatible with bash-completion (for bash 3.x) and bash-completion2 (for bash 4.x). See ./plugins/completion.bash
- Extended Bash history settings. See ./plugins/history.bash.
- Extended Bash manpage. See ./plugins/manpage.bash.
- Patch shell for macos. See ./plugins/macos.bash.
- Pretty ls command. See ./plugins/ls.bash.
- Pretty less command. See ./plugins/lesspipe.bash.
- Safe rm command. See ./aliases/avoid-mistakes.bash.
- Many third integrations
- z.lua. See ./plugins/zl.bash.
- fzf. See the configuration and ./plugins/fzf.bash.
- taskbook.
- cheat. See ./plugins/cheat.bash
- My best practices with tmux. See ./plugins/tmux.bash and ./configs/tmux.conf.
- My best practices with git. See ./plugins/git.bash and ./configs/gitconfig.
- My cheat sheets based on chrisallenlane/cheat.
- Support bash-preexec. It provides preexec and precmd functions for Bash just like Zsh. See ./plugins/preexec.bash.
- Support vscode. See ./plugins/vscode.bash.
- Support GNU utilities for mac. See ./plugins/gnutools-for-mac.bash and ./plugins/sed-for-mac.bash.
- Support programming language related like nvm, rust, gvm.
Click to expend/collapse
The prompt line is implemented by a-bash-prompt. See ./plugins/prompt.bash.
Responsive prompt. Press Enter to auto adjust with window width.
Show last command exit status
Highlight Backgound jobs:
Use sub commands:
Bubble Style and Block Style:
- ✅ iTerm2 Build 3.0.14 (Terminal.app compatible)
- ✅ GNU Bash 4.4 or 5.0+
- ✅ Tmux 3.3+ (Not necessary. Tmux compatible)
- ✅ MacOS Intel Arch
- ✅ MacOS ARM Arch
- ✅ Linux/Unix system
- 🚫 Windows system
- 🚫 Zsh. This project is just for Bash players. Zsh players should use Oh My Zsh.
- git
- python: Make sure it available before installation. Python 2 and 3 are both supported.
- perl 5+
- gawk: required by ble.sh
- Nerd Font: I recommend DejaVuSansMonoForPowerline Nerd Font.
These dependencies are not required for the project. It will improve the experience of terminal. Install them as your requirement.
- Color Scheme: I recommend Deep.
- ag
- cheat
- exa
- fzf
- git-prompt: If omitted, PS1 will not show git prompt.
- tmux: An awesome terminal multiplexer!
- trash
- z.lua
Git submodules required in one.bash.
- dotbot: To create symbolic links and manage them by config.
- lobash: A modern, safe, powerful utility/library for Bash script development.
- a-bash-prompt: A Bash prompt written by pure Bash script.
- bash-preexec: Add
preexec_functions
,precmd_functions
arrays, andprecmd
,preexec
functions for bash.
Just invoke one dep install
to install.
one dep update one.share
to update codes.
./recommended-modules
# If ONE_BASH_IT_ENABLE=true
one completion enable aliases.completion
Read one.bash documents for usage.
.
├── aliases/ # Available aliases
├── bin/ # Executables. The directory path is added to PATH by one.bash.
├── completions/ # Available completions
├── configs/ # dotfiles, configs
├── deps/ # the dependencies for modules
│ ├── a-bash-prompt/ # https://github.com/adoyle-h/a-bash-prompt
│ ├── bash-preexec/ # https://github.com/rcaloras/bash-preexec
│ ├── cheatsheets-community/ # https://github.com/cheat/cheat
│ └── z.lua/ # https://github.com/skywind3000/z.lua
├── docs/ # The documents of this project
├── plugins/ # Available plugins
│ ├── completions.bash # Enable general completions and tab complete keymap
│ ├── preexec.bash # Enable bash-preexec
│ └── prompt.bash # Enable a-bash-prompt
└── sub/ # The commands for ONE_SUB
Some modules are slow. Set ONE_DEBUG=true
in ONE_CONF file, you will see the logs showing slow loading time.
- With
ONE_NO_MODS=true
,[one.bash|00:00:00|entry.bash] loaded success (Total 112ms)
- With
ONE_NO_MODS=false
andone plugin enable fuck nvm npm
,[one.bash|00:00:00|entry.bash] loaded success (Total 2200ms)
If using tmux, $TERM
should be xterm-256color
or screen-256color
for best appearance.
Use one_prompt_append
add function to PROMPT_COMMAND.
When one plugin enable completion
,
The completion files loaded in order:
- bash_completion will load files in order:
- ${BASH_COMPLETION_COMPAT_DIR:-/usr/local/etc/bash_completion.d}
- ${BASH_COMPLETION_USER_FILE:-~/.bash_completion}
- this plugin will load
- $HOME/.bash_completions
Any comments and suggestions are always welcome.
Before open an issue/discussion/PR, You should search related issues/discussions/PRs first for avoiding to create duplicated links.
- For new feature request, open a discussion, describe your demand concisely and clearly.
- For new feature submit, open a PR, describe your demand and design concisely and clearly.
- For bug report, open an issue, describe the bug concisely and clearly.
- For bug fix, open a PR, concisely and clearly describe what you fixed.
- For question and suggestion, open a discussion.
- For anything not mentioned above, open a discussion.
Do not post duplicated and useless contents like +1
, LOL
. React to comments with emoji instead of.
你可以使用中文反馈意见。但希望你尽可能使用英文,不要中英文混杂,而是完全的英文语句。 因为我们处于国际社区,英文更通用,方便外国人阅读理解你的意见。 (Please communicate in English as much as possible)
See tags. The versions follows the rules of SemVer 2.0.0.
Copyright 2022 ADoyle (adoyle.h@gmail.com) Some Rights Reserved. The project is licensed under the Apache License Version 2.0.
Read the LICENSE file for the specific language governing permissions and limitations under the License.
Read the NOTICE file distributed with this work for additional information regarding copyright ownership.