summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Weidenbaum2015-06-09 11:41:58 -0700
committerAndy Weidenbaum2015-06-09 11:41:58 -0700
commit7e9ee8746e5262612d8190f22995bbed66d1368f (patch)
tree691af86b962115bff43873c68d07bc955638077a
downloadaur-7e9ee8746e5262612d8190f22995bbed66d1368f.tar.gz
Initial import
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD26
-rw-r--r--commacd.164
-rw-r--r--commacd.install4
4 files changed, 110 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..77793ac59b78
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = commacd
+ pkgdesc = A faster way to move around Bash
+ pkgver = 0.2.1
+ pkgrel = 1
+ url = https://github.com/shyiko/commacd
+ install = commacd.install
+ arch = any
+ license = MIT
+ depends = bash
+ source = commacd-0.2.1.tar.gz::https://codeload.github.com/shyiko/commacd/tar.gz/v0.2.1
+ source = commacd.1
+ sha256sums = 0eca4bb6b9b128c2322b0573bc508bc204177415f517ca24f9744118d5c0b792
+ sha256sums = e1cf248eb023fb608432d97e92421d8a15cf3d8f2144b5b9a29c4e80653e1382
+
+pkgname = commacd
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..4de8b1227c3d
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,26 @@
+# Maintainer: Andy Weidenbaum <archbaum@gmail.com>
+# Maintainer: Kevin MacMartin <prurigro at gmail dot com>
+
+pkgname=commacd
+pkgver=0.2.1
+pkgrel=1
+pkgdesc="A faster way to move around Bash"
+arch=('any')
+depends=('bash')
+url="https://github.com/shyiko/commacd"
+license=('MIT')
+source=($pkgname-$pkgver.tar.gz::https://codeload.github.com/shyiko/$pkgname/tar.gz/v$pkgver
+ commacd.1)
+sha256sums=('0eca4bb6b9b128c2322b0573bc508bc204177415f517ca24f9744118d5c0b792'
+ 'e1cf248eb023fb608432d97e92421d8a15cf3d8f2144b5b9a29c4e80653e1382')
+install=commacd.install
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ msg 'Installing man page...'
+ install -Dm 644 "$srcdir/commacd.1" "$pkgdir/usr/share/man/man1/commacd.1"
+
+ msg 'Installing...'
+ install -Dm 755 commacd.bash "$pkgdir/usr/share/$pkgname/commacd.bash"
+}
diff --git a/commacd.1 b/commacd.1
new file mode 100644
index 000000000000..e713e50afdeb
--- /dev/null
+++ b/commacd.1
@@ -0,0 +1,64 @@
+.if !\n(.g \{\
+. if !\w|\*(lq| \{\
+. ds lq ``
+. if \w'\(lq' .ds lq "\(lq
+. \}
+. if !\w|\*(rq| \{\
+. ds rq ''
+. if \w'\(rq' .ds rq "\(rq
+. \}
+.\}
+.ie t .ds Tx \s-1T\v'.4n'\h'-.1667'E\v'-.4n'\h'-.125'X\s0
+. el .ds Tx TeX
+.de Id
+. ds Yr \\$4
+. substring Yr 0 3
+. ds Mn \\$4
+. substring Mn 5 6
+. ds Dy \\$4
+. substring Dy 8 9
+. \" ISO 8601 date, complete format, extended representation
+. ds Dt \\*(Yr-\\*(Mn-\\*(Dy
+..
+.TH commacd 1 \*(Dt "commacd (git)" "User Commands"
+.hy 0
+.
+.SH "NAME"
+.B commacd
+\- a faster way to move around Bash
+.
+.SH "USAGE"
+.TP
+, => jump forward
+.TP
+,, => jump backward
+.TP
+,,, => jump backward+forward
+.
+.SH "EXAMPLES"
+.TP 4
+jump directories using only part of its name:
+~$ , des => cd Desktop
+.
+.TP 4
+jump through multiple directories the same way:
+~$ , /u/l/ce => cd /usr/local/Cellar
+.
+.TP 4
+begin with a wildcard to match any part of the name:
+~/Documents$ , ~/*esk => cd ~/Desktop
+.
+.TP 4
+jump to the closest matching parent directory:
+~/Documents/test/folder$ ,, Doc => cd ~/Documents
+.
+.TP 4
+jump by substituting one directory name for another:
+\fI~/Docs/test/dir$\fR ,, test test2 => cd ~/Docs/test2/dir
+.
+.TP 4
+jump to the closest match contained by a parent directory:
+~/Docs/test/dir$ ,,, de => cd ~/Desktop
+.
+.SH "LICENSE"
+MIT License \fIhttp://opensource\.org/licenses/mit\-license.php\fR\.
diff --git a/commacd.install b/commacd.install
new file mode 100644
index 000000000000..5990bf74748a
--- /dev/null
+++ b/commacd.install
@@ -0,0 +1,4 @@
+post_install(){
+ echo 'To use, add the following command to ~/.bashrc or /etc/bash.bashrc:'
+ echo '[[ -r "/usr/share/commacd/commacd.bash" ]] && source /usr/share/commacd/commacd.bash'
+}