From 14490362858519d558f21bc8eab7cf276bf11db2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matias=20Iba=C3=B1ez?= Date: Mon, 7 Sep 2015 01:43:40 -0300 Subject: [PATCH 1/4] Update simple theme PS1 definition via PROMPT variable produces an invalid prompt --- themes/simple/simple.theme.bash | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/themes/simple/simple.theme.bash b/themes/simple/simple.theme.bash index 39e16a1c..8b897ddc 100644 --- a/themes/simple/simple.theme.bash +++ b/themes/simple/simple.theme.bash @@ -11,11 +11,15 @@ case $TERM in TITLEBAR="" ;; esac -PROMPT="${TITLEBAR}${orange}${reset_color}${green}\w${bold_blue}\[\$(scm_prompt_info)\]${reset_color} " +function prompt_command() { + PS1="${TITLEBAR}${orange}${reset_color}${green}\w${bold_blue}\[\$(scm_prompt_info)\]${reset_color} " +} # scm themeing SCM_THEME_PROMPT_DIRTY=" ✗" SCM_THEME_PROMPT_CLEAN=" ✓" SCM_THEME_PROMPT_PREFIX="(" SCM_THEME_PROMPT_SUFFIX=")" + +PROMPT_COMMAND=prompt_command; From 994c235b3f321c8805d83022844667fc34325ccd Mon Sep 17 00:00:00 2001 From: Nils Winkler Date: Mon, 7 Sep 2015 08:54:29 +0200 Subject: [PATCH 2/4] Fixed a couple of repo references --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c2ba06bc..39a73bd0 100644 --- a/README.md +++ b/README.md @@ -46,9 +46,9 @@ Anything in the custom directory will be ignored, with the exception of `custom/ ## Themes -There are a few bash it themes. If you've created your own custom prompts, I'd love it if you shared with everyone else! Just submit a Pull Request to me (revans). +There are a few bash it themes. If you've created your own custom prompts, I'd love it if you shared with everyone else! Just submit a Pull Request. -You can see the theme screenshots [here](https://github.com/revans/bash-it/wiki/Themes) +You can see the theme screenshots [here](https://github.com/Bash-it/bash-it/wiki/Themes) Alternatively, you can preview the themes in your own shell using `BASH_PREVIEW=true reload` @@ -89,7 +89,7 @@ It is possible for themes to ignore the `SCM_CHECK` flag and query specific vers ### Git prompt -Bash it has some nice features related to git, continue reading to know more about. +Bash it has some nice features related to Git, continue reading to know more about these features. #### Repository info in the prompt @@ -197,5 +197,5 @@ Thanks, and happing bashing! * [List of contributors][contribute] -[contribute]: https://github.com/revans/bash-it/contributors +[contribute]: https://github.com/Bash-it/bash-it/contributors [pass password manager]: http://www.passwordstore.org/ From 7384b284ec737ce0b3ec803d9108b7f94f6d8057 Mon Sep 17 00:00:00 2001 From: Nils Winkler Date: Mon, 7 Sep 2015 09:56:16 +0200 Subject: [PATCH 3/4] Added alias completion to the default install options --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 3baa1d58..38b5d64e 100755 --- a/install.sh +++ b/install.sh @@ -89,6 +89,7 @@ else echo "" echo -e "\033[0;32mEnabling sane defaults\033[0m" load_one completion bash-it.completion.bash + load_one plugins alias-completion.bash fi echo "" From 546f90e368da2b132577efdb91da1c53cfc3d104 Mon Sep 17 00:00:00 2001 From: Nils Winkler Date: Mon, 7 Sep 2015 12:46:34 +0200 Subject: [PATCH 4/4] Fixed reference and typo --- plugins/available/alias-completion.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/available/alias-completion.bash b/plugins/available/alias-completion.bash index 3949c78d..75c8263f 100644 --- a/plugins/available/alias-completion.bash +++ b/plugins/available/alias-completion.bash @@ -2,7 +2,7 @@ cite about-plugin about-plugin 'Automatic completion of aliases' # References: -# http://superuser.com/questions/436314/how-can-i-get-bash-to-perform-tab-completion-for-my-aliases +# http://superuser.com/a/437508/119764 # http://stackoverflow.com/a/1793178/1228454 # This needs to be a plugin so it gets executed after the completions and the aliases have been defined. @@ -36,7 +36,7 @@ function alias_completion { eval "local alias_tokens; alias_tokens=($line)" 2>/dev/null || continue # some alias arg patterns cause an eval parse error local alias_name="${alias_tokens[0]}" alias_cmd="${alias_tokens[1]}" alias_args="${alias_tokens[2]# }" - # skip aliases to pipes, boolan control structures and other command lists + # skip aliases to pipes, boolean control structures and other command lists # (leveraging that eval errs out if $alias_args contains unquoted shell metacharacters) eval "local alias_arg_words; alias_arg_words=($alias_args)" 2>/dev/null || continue # avoid expanding wildcards