aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-08-10 11:25:19 +1200
committerTom Ryder <tom@sanctum.geek.nz>2016-08-10 11:25:19 +1200
commit225bd89d5665bb3098e169eece9bd7f73b8f6f3c (patch)
treed779af64c9311352ca251984215227736c3c0412
parentLimit prompt setup to OpenBSD pdksh (diff)
parentCorrect minor inaccuracy in slsf(1) man page (diff)
downloaddotfiles-225bd89d5665bb3098e169eece9bd7f73b8f6f3c.tar.gz
dotfiles-225bd89d5665bb3098e169eece9bd7f73b8f6f3c.zip
Merge branch 'master' into freebsd
-rw-r--r--README.markdown6
-rw-r--r--bash/bash_completion.d/prompt.bash2
-rw-r--r--bash/bashrc.d/prompt.bash37
-rw-r--r--man/man1/slsf.14
4 files changed, 6 insertions, 43 deletions
diff --git a/README.markdown b/README.markdown
index 0c7035a8..dc97891d 100644
--- a/README.markdown
+++ b/README.markdown
@@ -62,7 +62,7 @@ Configuration is included for:
* [`mysql(1)`](http://linux.die.net/man/1/mysql) -- Command-line MySQL client
* [Ncmpcpp](https://rybczak.net/ncmpcpp/) -- ncurses music player client
* [Newsbeuter](https://www.newsbeuter.org/) -- Terminal RSS/Atom feed reader
-* [`pdksh(1)`](https://www.cs.mun.ca/~michael/pdksh/) -- public domain fork
+* [`pdksh(1)`](http://www.cs.mun.ca/~michael/pdksh/) -- public domain fork
of the Korn shell
* [`psql(1)`](http://linux.die.net/man/1/psql) -- Command-line PostgreSQL
client
@@ -146,8 +146,8 @@ A terminal session with my prompt looks something like this:
It expands based on context to include these elements in this order:
* Whether in a Git repository if applicable, and punctuation to show whether
- there are local modifications at a glance; Subversion and Mercurial support
- can also be enabled
+ there are local modifications at a glance; Subversion support can also be
+ enabled (I need it at work)
* The number of running background jobs, if non-zero
* The exit status of the last command, if non-zero
diff --git a/bash/bash_completion.d/prompt.bash b/bash/bash_completion.d/prompt.bash
index a2e8df4b..d73d77ec 100644
--- a/bash/bash_completion.d/prompt.bash
+++ b/bash/bash_completion.d/prompt.bash
@@ -1,2 +1,2 @@
# Complete subcommands for the prompt wrapper
-complete -W 'on off git hg svn vcs ret job' prompt
+complete -W 'on off git svn vcs ret job' prompt
diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash
index bef80733..ba678909 100644
--- a/bash/bashrc.d/prompt.bash
+++ b/bash/bashrc.d/prompt.bash
@@ -148,43 +148,6 @@ prompt() {
(IFS= ; printf '(git:%s%s)' "${branch:-unknown}" "${state[*]}")
;;
- # Mercurial prompt function
- hg)
- # Bail if we have no hg(1)
- if ! hash hg 2>/dev/null ; then
- return 1
- fi
-
- # Exit if not inside a Mercurial tree
- local branch
- if ! branch=$(hg branch 2>/dev/null) ; then
- return 1
- fi
-
- # Safely read status with -0
- local line
- local -i modified untracked
- while IFS= read -rd '' line ; do
- if [[ $line == '?'* ]] ; then
- untracked=1
- else
- modified=1
- fi
- done < <(hg status -0 2>/dev/null)
-
- # Build state array from status output flags
- local -a state
- if ((modified)) ; then
- state[${#state[@]}]='!'
- fi
- if ((untracked)) ; then
- state[${#state[@]}]='?'
- fi
-
- # Print the status in brackets with an hg: prefix
- (IFS= ; printf '(hg:%s%s)' "${branch:-unknown}" "${state[*]}")
- ;;
-
# Subversion prompt function
svn)
# Bail if we have no svn(1)
diff --git a/man/man1/slsf.1 b/man/man1/slsf.1
index b98bd473..b34a719d 100644
--- a/man/man1/slsf.1
+++ b/man/man1/slsf.1
@@ -11,8 +11,8 @@ cat ~/.ssh_config |
.SH DESCRIPTION
.B slsf
iterates through the ssh_config(5) files given as its input and prints the
-first non-wildcard hostname on each "Host" line. Most users will probably want
-the sls(1) frontend.
+first name given on each "Host" line, as long as it contains no wildcards. Most
+users will probably want the sls(1) frontend.
.P
Within the file, a comment "### nosls" on its own line will exclude all
following output unless an "### sls" comment is read to resume it again: