-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from jbh/feature/GitCompletion
Git completion
- Loading branch information
Showing
7 changed files
with
53 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.3.0 | ||
1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
%define name ibmi-dotfiles | ||
%define release 0 | ||
%define version 0.3 | ||
%define name ibmi-dotfiles | ||
%define release 0 | ||
%define version 1.0 | ||
%define git_completion https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash | ||
%define git_prompt https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh | ||
|
||
Name: %{name} | ||
Version: %{version} | ||
Release: %{release} | ||
Requires: /QOpenSys/pkgs/bin/find | ||
BuildArch: noarch | ||
Requires: /QOpenSys/pkgs/bin/find /QOpenSys/pkgs/bin/curl | ||
Source: %{name}-%{version}.tar.gz | ||
Summary: Shell configuration files for IBM i. | ||
License: MIT | ||
|
@@ -14,18 +17,22 @@ License: MIT | |
Shell configuration files for IBM i. | ||
|
||
%prep | ||
%setup -q | ||
%setup | ||
|
||
%install | ||
mkdir -p %{buildroot}/QOpenSys/pkgs/bin | ||
install -m 755 ./ibmi-dotfiles/script/bootstrap %{buildroot}/QOpenSys/pkgs/bin/ibmi-dotfiles | ||
install -m 755 ./script/bootstrap %{buildroot}/QOpenSys/pkgs/bin/ibmi-dotfiles | ||
mkdir -p %{buildroot}/QOpenSys/etc/ibmi-dotfiles | ||
cp -r ./ibmi-dotfiles/* %{buildroot}/QOpenSys/etc/ibmi-dotfiles | ||
/QOpenSys/pkgs/bin/curl %{git_completion} -o %{buildroot}/QOpenSys/etc/ibmi-dotfiles/git-completion.bash | ||
/QOpenSys/pkgs/bin/curl %{git_prompt} -o %{buildroot}/QOpenSys/etc/ibmi-dotfiles/git-prompt.sh | ||
cp -r ./* %{buildroot}/QOpenSys/etc/ibmi-dotfiles | ||
|
||
%files | ||
%defattr(-, qsys, *none) | ||
/QOpenSys/pkgs/bin/ibmi-dotfiles | ||
/QOpenSys/etc/ibmi-dotfiles | ||
|
||
%changelog | ||
# let skip this for now | ||
* Sun Jun 14 2020 Joshua Hall <[email protected]> - 1.0-ibmi-dotfiles | ||
- Support git bash completion and prompt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# .after_dotfiles | ||
# vim:syntax=sh | ||
|
||
. /QOpenSys/etc/ibmi-dotfiles/git-completion.bash | ||
. /QOpenSys/etc/ibmi-dotfiles/git-prompt.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# .before_dotfiles | ||
# vim:syntax=sh | ||
|
||
# check the window size after each command and, if necessary, | ||
# update the values of LINES and COLUMNS. | ||
shopt -s checkwinsize | ||
|
||
# If set, the pattern "**" used in a pathname expansion context will | ||
# match all files and zero or more directories and subdirectories. | ||
shopt -s globstar | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
# .history | ||
# vim:syntax=sh | ||
|
||
# Larger bash history (allow 32³ entries; default is 500) | ||
# Huge history | ||
export HISTSIZE=32768 | ||
export HISTFILESIZE=$HISTSIZE | ||
export HISTCONTROL=ignoreboth | ||
|
||
# Ignore some commands in history | ||
export HISTIGNORE="ls:ls *:llcd:cd -:pwd;exit:date:* --help" | ||
|
||
# append to the history file, don't overwrite it | ||
shopt -s histappend | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
# .prompt | ||
# vim:syntax=sh | ||
|
||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' | ||
export GIT_PS1_SHOWDIRTYSTATE=1 | ||
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\] $(__git_ps1 "(\[\033[32m\]%s\[\033[m\]) ")\[\033[1;33m\]→\[\033[m\] ' | ||
|