aboutsummaryrefslogtreecommitdiff
path: root/mkshrc
diff options
context:
space:
mode:
authorMitch Riedstra <mitch@riedstra.us>2018-11-14 19:28:11 -0500
committerMitch Riedstra <mitch@riedstra.us>2018-11-14 19:28:11 -0500
commitc07992a45ff3205f2e576a5a8f6ff997d0c4f8c6 (patch)
treefb3a677f6af445e02649d07e9f494a16a9bf0d3a /mkshrc
parentd40e41fbd4947172deed5dd1c98daf79a0050f48 (diff)
downloaddotfiles-c07992a45ff3205f2e576a5a8f6ff997d0c4f8c6.tar.gz
dotfiles-c07992a45ff3205f2e576a5a8f6ff997d0c4f8c6.tar.xz
Fix whitespace calculations on bash with retro prompt. Fix shell detection for retro prompt.
remove pkgsrc and vis function as they're unused
Diffstat (limited to 'mkshrc')
-rw-r--r--mkshrc39
1 files changed, 12 insertions, 27 deletions
diff --git a/mkshrc b/mkshrc
index e00f898..5c7ead2 100644
--- a/mkshrc
+++ b/mkshrc
@@ -94,9 +94,18 @@ set_basic_prompt() {
export PS1;
}
set_retro_prompt() {
- export PS1="$(set_my_title)\$ "
- if [ `id -u` -eq 0 ] ; then
- export PS1="$(set_my_title)# "
+ if ! [ -z "$BASH" ] ; then
+ export PS1='\[$(set_my_title)\]\$ '
+ elif ! [ -z "$KSH_VERSION" ] ; then
+ export PS1='$(set_my_title)$ '
+ if [ $(id -un) -eq 0 ] ; then
+ export PS1='$(set_my_title)# '
+ fi
+ else
+ export PS1='$ '
+ if [ $(id -un) -eq 0 ] ; then
+ export PS1='# '
+ fi
fi
}
set_super_basic_prompt() {
@@ -177,30 +186,6 @@ debugstarttls() {
}
-getpkgsrc() {
- cd $HOME
- pull -f pkg.txz -u "https://www.rygel.us/misc/pkg-$(uname).txz"
- tar -xJvf pkg.txz && rm pkg.txz
- if ! [ -e $HOME/.mkshrc.pre ] ; then
- printf "export PATH=\$HOME/pkg/bin:\$PATH\n" > $HOME/.mkshrc.pre
- fi
- cd -
-}
-installvis() {
- cd $HOME
- pull -u "https://www.rygel.us/misc/vis-$(uname)" -f vis-editor
- if [ $(id -u) -eq 0 ] ; then
- install -o root -m 555 vis-editor /usr/local/bin/vis-editor && \
- rm vis-editor
- else
- if ! [ -d $HOME/bin ] ; then
- mkdir $HOME/bin
- fi
- install -m 555 vis-editor $HOME/bin/vis-editor && \
- rm vis-editor
- fi
-
-}
set_retro() {
set_retro_prompt
unalias vi