Skip to content

Commit

Permalink
Merge pull request #8 from jbh/feature/GitCompletion
Browse files Browse the repository at this point in the history
Git completion
  • Loading branch information
jbh authored Jun 16, 2020
2 parents cfed719 + 24efad2 commit f2a1ee4
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 16 deletions.
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Use your favorite text editor and create the file `/QOpenSys/etc/yum/repos.d/sob
```
[sobored]
name=sobored
baseurl=http://rpms.sobo.red/ibmi/ppc64/
baseurl=http://rpms.sobo.red/ibmi/
enabled=1
gpgcheck=0
```
Expand Down Expand Up @@ -46,3 +46,17 @@ Please use the full path here. Relative paths are untested.
```
ibmi-dotfiles --install-path /desired/install/path
```

## Note for those that used beta versions

> Please note that the repo URL has changed: `http://rpms.sobo.red/ibmi/`.
This must be updated in `/QOpenSys/etc/yum/repos.d/sobored.repo`

Since I've changed the architecture to noarch, you'll probably have to:

```
yum clean metadata
yum remove ibmi-dotfiles
yum install ibmi-dotfiles
```

2 changes: 1 addition & 1 deletion dotfiles.symlink/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.3.0
1.0.0
23 changes: 15 additions & 8 deletions ibmi-dotfiles.spec
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
Expand All @@ -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

6 changes: 6 additions & 0 deletions system/after_dotfiles.symlink
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

11 changes: 11 additions & 0 deletions system/before_dotfiles.symlink
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

7 changes: 2 additions & 5 deletions system/history.symlink
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

4 changes: 3 additions & 1 deletion system/prompt.symlink
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\] '

0 comments on commit f2a1ee4

Please sign in to comment.