Skip to content

Commit ac3ff85

Browse files
author
anki-code
committed
init
1 parent 6120eee commit ac3ff85

File tree

5 files changed

+75
-2
lines changed

5 files changed

+75
-2
lines changed

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
1-
# xxh-plugin-bash-ohmybash
2-
Oh My Bash xxh plugin
1+
[Oh My Bash](https://github.com/ohmybash/oh-my-bash) plugin for bash xxh-shell.
2+
3+
## Install
4+
From xxh repo:
5+
```
6+
xxh +I xxh-plugin-bash-ohmybash
7+
xxh yourhost +s bash-zero +if
8+
```
9+
From any repo:
10+
```
11+
xxh +I xxh-plugin-bash-ohmybash+git+https://github.com/xxh/xxh-plugin-bash-ohmybash
12+
```
13+
Connect:
14+
``````
15+
xxh yourhost +s bash-zero +if
16+
```

build.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env bash
2+
3+
CDIR="$(cd "$(dirname "$0")" && pwd)"
4+
build_dir=$CDIR/build
5+
6+
while getopts q option
7+
do
8+
case "${option}"
9+
in
10+
q) QUIET=1;;
11+
esac
12+
done
13+
14+
rm -rf $build_dir
15+
mkdir -p $build_dir
16+
17+
for f in pluginrc.sh
18+
do
19+
cp $CDIR/$f $build_dir/
20+
done
21+
22+
url='git://github.com/ohmybash/oh-my-bash.git'
23+
home_dir=oh-my-bash
24+
25+
[ $QUIET ] && arg_q='-q' || arg_q=''
26+
if [ -x "$(command -v git)" ]; then
27+
git clone $arg_q --depth=1 $url $home_dir
28+
else
29+
echo You should install git: https://duckduckgo.com/?q=install+git+on+linux
30+
fi

env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
OSH_THEME
2+
plugins

pluginrc.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
CURR_DIR="$(cd "$(dirname "$0")" && pwd)"
2+
3+
4+
if [[ -v OSH_THEME ]]; then
5+
if [[ $XXH_VERBOSE == '2' ]]; then
6+
echo $plugin_name: Found OSH_THEME=$OSH_THEME
7+
fi
8+
else
9+
if [[ $XXH_VERBOSE == '2' ]]; then
10+
echo $plugin_name: Set default OSH_THEME=agnoster
11+
fi
12+
export OSH_THEME="agnoster"
13+
fi
14+
15+
if [[ -v plugins ]]; then
16+
if [[ $XXH_VERBOSE == '2' ]]; then
17+
echo $plugin_name: Found plugins=$plugins
18+
fi
19+
else
20+
if [[ $XXH_VERBOSE == '2' ]]; then
21+
echo $plugin_name: Set default plugins=git
22+
fi
23+
export plugins=(git)
24+
fi
25+
26+
source $CURR_DIR/oh-my-bash/templates/bashrc.osh-template

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
xxh-xxh

0 commit comments

Comments
 (0)