diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-01-28 22:53:21 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-01-28 22:53:21 +1300 |
commit | 98fd6a8802d2fbf1e7727b188b4ea5acc5f5fc61 (patch) | |
tree | 8a2bb4a03199fb43e1d98965fea0257f4d689d75 | |
parent | Merge branch 'master' into port/bsd/freebsd (diff) | |
parent | Add completion for finger(1) (diff) | |
download | dotfiles-98fd6a8802d2fbf1e7727b188b4ea5acc5f5fc61.tar.gz dotfiles-98fd6a8802d2fbf1e7727b188b4ea5acc5f5fc61.zip |
Merge branch 'master' into port/bsd/freebsd
33 files changed, 262 insertions, 85 deletions
@@ -15,6 +15,7 @@ bin/min bin/mode bin/nlbr bin/onl +bin/quo bin/rfct bin/rndi bin/sd2u @@ -37,6 +38,5 @@ git/gitconfig gnupg/gpg.conf mail/mailrc man/man7/dotfiles.7df -mutt/muttrc tmux/tmux.conf urxvt/ext/select diff --git a/ISSUES.markdown b/ISSUES.markdown index c29fc284..383d7906 100644 --- a/ISSUES.markdown +++ b/ISSUES.markdown @@ -18,6 +18,3 @@ Known issues * I can't find a clean way of detecting a restricted shell for ksh instances to prevent trying to load anything fancy (works for Bash) * Zsh, either! $options[restricted] is "off" within the startup file -* I'm still not sure that the special character escaping for the ksh prompt - actually works. The line-wrapping behaviour for ksh93 seems to be a bit - weird. This requires debugging. @@ -18,8 +18,6 @@ install-gtk \ install-i3 \ install-less \ - install-mail \ - install-maildir \ install-mutt \ install-ncmcpp \ install-newsbeuter \ @@ -84,6 +82,7 @@ BINS = bin/brnl \ bin/mode \ bin/nlbr \ bin/onl \ + bin/quo \ bin/rfct \ bin/rndi \ bin/sd2u \ @@ -112,9 +111,7 @@ clean distclean : $(GAMES) \ git/gitconfig \ gnupg/gpg.conf \ - mail/mailrc \ - man/man7/dotfiles.7df \ - mutt/muttrc \ + man/man8/dotfiles.7df \ tmux/tmux.conf \ urxvt/ext/select @@ -134,22 +131,12 @@ gnupg/gpg.conf : gnupg/gpg.conf.m4 -D DOTFILES_KEYSERVER="$(KEYSERVER)" \ gnupg/gpg.conf.m4 > gnupg/gpg.conf -mail/mailrc : mail/mailrc.m4 - m4 -D DOTFILES_SENDMAIL="$$(command -v "$(SENDMAIL)")" \ - mail/mailrc.m4 > "$@" - man/man7/dotfiles.7df : README.markdown man/man7/dotfiles.7df.header cat man/man7/dotfiles.7df.header README.markdown | \ pandoc -sS -t man -o "$@" MAILDIR := $(HOME)/Mail -mutt/muttrc : mutt/muttrc.m4 - m4 \ - -D DOTFILES_SENDMAIL="$(SENDMAIL)" \ - -D DOTFILES_MAILDIR="$(MAILDIR)" \ - mutt/muttrc.m4 > mutt/muttrc - TMUX_BG := colour237 TMUX_FG := colour248 @@ -269,24 +256,12 @@ install-less : install -pm 0644 -- less/lesskey "$(HOME)"/.lesskey command -v lesskey && lesskey -install-mail : mail/mailrc - install -pm 0644 -- mail/mailrc "$(HOME)"/.mailrc - -install-maildir : - for box in drafts inbox sent ; do \ - for dir in cur new tmp ; do \ - install -m 0755 -d -- \ - "$(MAILDIR)"/"$$box"/"$$dir" ; \ - done ; \ - done - -install-mutt : mutt/muttrc install-mail install-maildir +install-mutt : install -m 0755 -d -- \ - "$(HOME)"/.mutt \ + "$(HOME)"/.muttrc.d \ "$(HOME)"/.cache/mutt install -pm 0644 -- mutt/muttrc "$(HOME)"/.muttrc - install -pm 0644 -- mutt/signature "$(HOME)"/.signature - [ -f "$(HOME)"/.mutt/muttrc.local ] || touch "$(HOME)"/.mutt/muttrc.local + install -pm 0755 -- mutt/muttrc.d/src "$(HOME)"/.muttrc.d install-ncmcpp : install -m 0755 -d -- "$(HOME)"/.ncmpcpp diff --git a/README.markdown b/README.markdown index be0f6481..2ae64927 100644 --- a/README.markdown +++ b/README.markdown @@ -426,6 +426,7 @@ Installed by the `install-bin` target: * `cfr(1df)` does the same as `cf(1df)`, but recurses into subdirectories as well. * `chc(1df)` caches the output of a command. +* `chn(1df)` runs a filter over its input a given number of times. * `clog(1df)` is a tiny timestamped log system. * `clrd(1df)` sets up a per-line file read, clearing the screen first. * `clwr(1df)` sets up a per-line file write, clearing the screen before each @@ -484,6 +485,7 @@ Installed by the `install-bin` target: [`plenv`](https://github.com/tokuhirom/plenv), filters out any modules in `~/.plenv/non-cpan-modules`, and updates them all. * `pwg(1df)` generates just one decent password with `pwgen(1)`. +* `quo(1df)` quotes its input with right angle brackets. * `rgl(1df)` is a very crude interactive `grep(1)` loop. * `shb(1df)` attempts to build shebang lines for scripts from the system paths. diff --git a/bash/bash_completion.d/dig.bash b/bash/bash_completion.d/dig.bash new file mode 100644 index 00000000..bdbd1cd8 --- /dev/null +++ b/bash/bash_completion.d/dig.bash @@ -0,0 +1,2 @@ +# Complete dig(1) with hostnames +complete -A hostname dig diff --git a/bash/bash_completion.d/finger.bash b/bash/bash_completion.d/finger.bash new file mode 100644 index 00000000..5594adde --- /dev/null +++ b/bash/bash_completion.d/finger.bash @@ -0,0 +1,2 @@ +# Completion for finger(1) +complete -A user finger diff --git a/bash/bash_completion.d/git.bash b/bash/bash_completion.d/git.bash index bde515ee..5cf42ed3 100644 --- a/bash/bash_completion.d/git.bash +++ b/bash/bash_completion.d/git.bash @@ -109,8 +109,8 @@ _git() { # Complete initial subcommand or alias if ((sci == COMP_CWORD)) ; then - _git subcommands - _git aliases + "${FUNCNAME[0]}" subcommands + "${FUNCNAME[0]}" aliases return fi @@ -119,13 +119,13 @@ _git() { # Complete with untracked, unignored files add) - _git untracked_files + "${FUNCNAME[0]}" untracked_files return ;; # Help on real subcommands (not aliases) help) - _git subcommands + "${FUNCNAME[0]}" subcommands return ;; @@ -149,7 +149,7 @@ _git() { update ' -- "${COMP_WORDS[COMP_CWORD]}") else - _git remotes + "${FUNCNAME[0]}" remotes fi return ;; @@ -199,15 +199,15 @@ _git() { # Complete with remotes and then refs fetch|pull|push) if ((COMP_CWORD == 2)) ; then - _git remotes + "${FUNCNAME[0]}" remotes else - _git refs + "${FUNCNAME[0]}" refs fi ;; # Commands for which I'm likely to want a ref branch|checkout|merge|rebase|tag) - _git refs + "${FUNCNAME[0]}" refs ;; # I normally only want a refspec for "reset" if I'm using the --hard or @@ -215,7 +215,7 @@ _git() { reset) case ${COMP_WORDS[COMP_CWORD-1]} in --hard|--soft) - _git refs + "${FUNCNAME[0]}" refs ;; esac ;; diff --git a/bash/bash_completion.d/host.bash b/bash/bash_completion.d/host.bash new file mode 100644 index 00000000..e49e76c4 --- /dev/null +++ b/bash/bash_completion.d/host.bash @@ -0,0 +1,2 @@ +# Complete host(1) with hostnames +complete -A hostname host diff --git a/bash/bash_completion.d/nc.bash b/bash/bash_completion.d/nc.bash new file mode 100644 index 00000000..8ef1fe69 --- /dev/null +++ b/bash/bash_completion.d/nc.bash @@ -0,0 +1,2 @@ +# Complete nc(1) with hostnames +complete -A hostname nc diff --git a/bash/bash_completion.d/netcat.bash b/bash/bash_completion.d/netcat.bash new file mode 100644 index 00000000..60b9d614 --- /dev/null +++ b/bash/bash_completion.d/netcat.bash @@ -0,0 +1,2 @@ +# Complete netcat(1) with hostnames +complete -A hostname netcat diff --git a/bash/bash_completion.d/nmap.bash b/bash/bash_completion.d/nmap.bash new file mode 100644 index 00000000..7126ca68 --- /dev/null +++ b/bash/bash_completion.d/nmap.bash @@ -0,0 +1,2 @@ +# Complete nmap(1) with hostnames +complete -A hostname nmap diff --git a/bash/bash_completion.d/openssl.bash b/bash/bash_completion.d/openssl.bash new file mode 100644 index 00000000..b2bc1b7d --- /dev/null +++ b/bash/bash_completion.d/openssl.bash @@ -0,0 +1,32 @@ +# Some simple completion for openssl(1ssl) +_openssl() { + + # Only complete the first word: OpenSSL subcommands + case $COMP_CWORD in + 1) + while read -r subcmd ; do + case $subcmd in + '') ;; + "${COMP_WORDS[COMP_CWORD]}"*) + COMPREPLY[${#COMPREPLY[@]}]=$subcmd + ;; + esac + done < <( + for arg in \ + list-cipher-commands \ + list-standard-commands \ + list-message-digest-commands ; do + printf '%s\n' "$arg" + openssl "$arg" + done + ) + ;; + esac +} + +# bashdefault requires Bash >=3.0 +if ((BASH_VERSINFO[0] >= 3)) ; then + complete -F _openssl -o bashdefault -o default openssl +else + complete -F _openssl -o default openssl +fi diff --git a/bash/bash_completion.d/ping.bash b/bash/bash_completion.d/ping.bash new file mode 100644 index 00000000..8dc27673 --- /dev/null +++ b/bash/bash_completion.d/ping.bash @@ -0,0 +1,2 @@ +# Complete ping(8) with hostnames +complete -A hostname ping diff --git a/bash/bash_completion.d/telnet.bash b/bash/bash_completion.d/telnet.bash new file mode 100644 index 00000000..eacf552d --- /dev/null +++ b/bash/bash_completion.d/telnet.bash @@ -0,0 +1,2 @@ +# Complete telnet(1) with hostnames +complete -A hostname telnet diff --git a/bash/bashrc b/bash/bashrc index ca13c4bf..16669adf 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -57,8 +57,8 @@ shopt -s histappend shopt -s histreedit # Repeat the expanded line on successful history expansion shopt -s histverify -# Don't use Bash's builtin host completion -shopt -u hostcomplete +# Use Bash's builtin host completion +shopt -s hostcomplete # Don't change newlines to semicolons in history shopt -s lithist # Don't warn me about new mail all the time diff --git a/bash/bashrc.d/completion.bash b/bash/bashrc.d/completion.bash index 0d8dbb13..c77f8844 100644 --- a/bash/bashrc.d/completion.bash +++ b/bash/bashrc.d/completion.bash @@ -6,6 +6,10 @@ # character: <http://tiswww.case.edu/php/chet/bash/FAQ> (E13) [[ -n $COMP_WORDBREAKS ]] && COMP_WORDBREAKS=${COMP_WORDBREAKS//:} +# If ~/.hosts exists, use that as the host completion file rather than +# /etc/hosts, so I can populate the list myself +[[ -f $HOME/.hosts ]] && HOSTFILE=$HOME/.hosts + # Aliases complete -A alias unalias diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash index 2bd70c2f..f64355f7 100644 --- a/bash/bashrc.d/prompt.bash +++ b/bash/bashrc.d/prompt.bash @@ -81,10 +81,13 @@ prompt() { # Revert to simple inexpensive prompts off) unset -v PROMPT_COMMAND PROMPT_DIRTRIM - PS1='\$ ' + PS1='$ ' PS2='> ' PS3='? ' PS4='+ ' + if [[ -n $SSH_CLIENT || -n $SSH_CONNECTION ]] ; then + PS1=$(id -nu)'@'$(hostname -s)'$ ' + fi ;; # Git prompt function diff --git a/bin/chn b/bin/chn new file mode 100755 index 00000000..46a8a27a --- /dev/null +++ b/bin/chn @@ -0,0 +1,70 @@ +#!/bin/sh +# Repeat a command to filter input several times +self=chn + +# Check arguments. +if [ "$#" -lt 2 ] ; then + printf >&2 '%s: Need a count and a program name\n' "$self" + exit 2 +fi + +# Shift off the repetition count. +c=$1 +shift + +# Check the repetition count looks sane. Zero is fine! +if [ "$c" -lt 0 ] ; then + printf >&2 '%s: Nonsensical negative count\n' "$self" + exit 2 +fi + +# If the count is zero, just run the input straight through! +if [ "$c" -eq 0 ] ; then + cat + exit +fi + +# Create a temporary directory with name in $td, and handle POSIX-ish traps to +# remove it when the script exits. +td= +cleanup() { + [ -n "$td" ] && rm -fr -- "$td" + if [ "$1" != EXIT ] ; then + trap - "$1" + kill "-$1" "$$" + fi +} +for sig in EXIT HUP INT TERM ; do + # shellcheck disable=SC2064 + trap "cleanup $sig" "$sig" +done +td=$(mktd "$self") || exit + +# Define and create input and output files +if=$td/if of=$td/of +touch -- "$if" "$of" + +# Iterate through the count +while [ "${n=1}" -le "$c" ] ; do + + # Start a subshell so we can deal with FDs cleanly + ( + # If this isn't the first iteration, our input comes from $if + [ "$n" -eq 1 ] || + exec <"$if" + + # If this isn't the last iteration, our output goes to $of + [ "$n" -eq "$c" ] || + exec >"$of" + + # Run the command with the descriptors above; if the command fails, the + # subshell will exit, which will in turn exit the program + "$@" + ) || exit + + # Copy the output file over the input one + cp -- "$of" "$if" + + # Increment the counter for the next while loop run + n=$((n+1)) +done diff --git a/bin/quo.sed b/bin/quo.sed new file mode 100644 index 00000000..1100d5ce --- /dev/null +++ b/bin/quo.sed @@ -0,0 +1,3 @@ +#!/bin/sed -f +/^[^>]/s/^/ / +s/^/>/ diff --git a/ksh/kshrc.d/prompt.ksh b/ksh/kshrc.d/prompt.ksh index 1dcbd864..1d4db926 100644 --- a/ksh/kshrc.d/prompt.ksh +++ b/ksh/kshrc.d/prompt.ksh @@ -80,7 +80,7 @@ function prompt { } >/dev/null 2>&1 # Play ball with ksh's way of escaping non-printing characters - typeset es nl + typeset es cr es=$(printf '\01') cr=$(printf '\r') @@ -188,10 +188,13 @@ function prompt { # Revert to simple inexpensive prompts off) - PS1='\$ ' + PS1='$ ' PS2='> ' PS3='? ' PS4='+ ' + if [[ -n $SSH_CLIENT || -n $SSH_CONNECTION ]] ; then + PS1=$(id -nu)'@'$(hostname -s)'$ ' + fi ;; # Abbreviated working directory diff --git a/mail/mailrc.m4 b/mail/mailrc.m4 deleted file mode 100644 index 873fe080..00000000 --- a/mail/mailrc.m4 +++ /dev/null @@ -1,3 +0,0 @@ -set sendmail=DOTFILES_SENDMAIL -unset askcc -set nosave skipempty diff --git a/man/man1/chn.1df b/man/man1/chn.1df new file mode 100644 index 00000000..576e5425 --- /dev/null +++ b/man/man1/chn.1df @@ -0,0 +1,47 @@ +.TH CHN 1df "January 2017" "Manual page for chn" +.SH NAME +.B chn +\- filter standard input through multiple runs of a command +.SH USAGE +.B chn +COUNT +COMMAND [ARG1...] +.SH DESCRIPTION +Run the given command the specified number of times, passing the standard +output of each run into the standard input of the next. +.P +As an example, to quote some text with quo(1df) repeatedly: +.P + $ cat msg + Hello! + $ chn 2 quo < msg + >> Hello! + $ chn 5 quo < msg + >>>> Hello! +.P +Zero is a valid count; in this case the input is passed untouched to output: +.P + $ chn 0 quo < msg + Hello! +.P +Don't confuse this with simply repeating a command. This happens to work: +.P + $ chn 5 sync +.P +But this will not do what you expect: +.P + $ chn 5 echo foo +.SH CAVEATS +It's slow. +.P +It's not a real pipe. The commands are run successively, not in parallel. That +means you can't pass one line to it and have it return another line before +sending EOF, for unbuffered (e.g. linewise) tools. +.P +There's almost certainly a better way to do this, fixing one or both of the +above issues, and possibly even in shell; maybe with curlier file descriptor +logic to save unneeded open(2) syscalls. I smell `eval` usage on the horizon. +.SH SEE ALSO +maybe(1df), try(1df) +.SH AUTHOR +Tom Ryder <tom@sanctum.geek.nz> diff --git a/man/man1/maybe.1df b/man/man1/maybe.1df index e313eb17..3b89b09d 100644 --- a/man/man1/maybe.1df +++ b/man/man1/maybe.1df @@ -22,6 +22,6 @@ of success or failure. rndi(1df) is used for the randomness. $ maybe 3 $ maybe 2 5 .SH SEE ALSO -true(1), false(1), try(1df), rndi(1df) +true(1), false(1), chn(1df), try(1df), rndi(1df) .SH AUTHOR Tom Ryder <tom@sanctum.geek.nz> diff --git a/man/man1/quo.1df b/man/man1/quo.1df new file mode 100644 index 00000000..643d8ff5 --- /dev/null +++ b/man/man1/quo.1df @@ -0,0 +1,22 @@ +.TH QUO 1df "January 2017" "Manual page for quo" +.SH NAME +.B quo +\- quote the input with right-angle brackets +.SH SYNOPSIS +.B quo +.br +Text on standard input. +.br +^D +.br +.B quo +FILE1 [FILE2...] +.br +.B quo < FILE +.SH DESCRIPTION +.B quo +quotes its input by insert a right-angle bracket followed by a space at the +start of every unquoted line. If the line was already quoted, it adds another +level of right-angle bracket. +.SH AUTHOR +Tom Ryder <tom@sanctum.geek.nz> diff --git a/man/man1/try.1df b/man/man1/try.1df index d982c1d3..63db5209 100644 --- a/man/man1/try.1df +++ b/man/man1/try.1df @@ -17,6 +17,6 @@ run. $ try maybe $ try -n5 -s10 gms .SH SEE ALSO -maybe(1df) +maybe(1df), chn(1df) .SH AUTHOR Tom Ryder <tom@sanctum.geek.nz> diff --git a/mutt/muttrc.m4 b/mutt/muttrc index 4709adef..7f40e617 100644 --- a/mutt/muttrc.m4 +++ b/mutt/muttrc @@ -1,23 +1,8 @@ -# Names -set use_domain = yes -set use_from = yes -set reverse_name = yes - -# SMTP implementation -set sendmail = 'DOTFILES_SENDMAIL' - -# Mailbox type and location -set mbox_type = 'Maildir' -set folder = 'DOTFILES_MAILDIR' - -# Submailboxes -set spoolfile = '+inbox' -set postponed = '+drafts' -set record = '+sent' -mailboxes ! - # Addresses set query_command = 'abook --mutt-query %s' +set reverse_name = yes +set use_domain = yes +set use_from = yes # Alerts set beep_new = yes @@ -113,7 +98,7 @@ set strict_threads = yes set thorough_search = yes # SSH -set time_inc=250 +set time_inc = 250 # Encryption settings set crypt_replysign = yes @@ -136,18 +121,14 @@ bind generic,index,browser,pager \Cb previous-page # Turn off annoying mailbox lock feature bind index '%' noop -# Jump to mailboxes -macro generic,index,browser,pager gi '<change-folder>=inbox<enter>' 'Change to inbox folder' -macro generic,index,browser,pager gs '<change-folder>=sent<enter>' 'Change to sent folder' - # Blindly save message to whatever box is suggested macro index,pager S 's<enter>' 'Save message blindly' # Run gms to retrieve all mail -macro generic,index,browser,pager gm '!gms --quiet &<enter>' 'Run gms' +macro generic,index,browser,pager gm '!gms --quiet &<enter>' 'Run gms(1df)' # Shortcut to add addresses to abook macro index,pager A '<pipe-message>abook --add-email<enter>' 'Add sender address to abook' # Machine or account specific settings -source ~/.mutt/muttrc.local +source ~/.muttrc.d/src| diff --git a/mutt/muttrc.d/src b/mutt/muttrc.d/src new file mode 100755 index 00000000..584a2785 --- /dev/null +++ b/mutt/muttrc.d/src @@ -0,0 +1,6 @@ +#!/bin/sh +# Helper script to emit the source all muttrc subfiles, in LC_COLLATE order +for rc in "$HOME"/.muttrc.d/*.rc ; do + [ -e "$rc" ] || continue + cat -- "$rc" +done diff --git a/mutt/signature b/mutt/signature deleted file mode 100644 index a229b5f5..00000000 --- a/mutt/signature +++ /dev/null @@ -1,2 +0,0 @@ -Tom Ryder <https://sanctum.geek.nz/> -The next 1<<10 years are ours. diff --git a/sh/profile.d/options.sh b/sh/profile.d/options.sh index a668a360..1a511d75 100644 --- a/sh/profile.d/options.sh +++ b/sh/profile.d/options.sh @@ -10,15 +10,15 @@ options() { shift # Directory already exists; bail out - [ -d "$dir" ] && exit + [ -d "$dir" ] && return # Create the directory and step into it - command -p mkdir -p -- "$dir" || exit - cd -- "$dir" || exit + command -p mkdir -p -- "$dir" || return + cd -- "$dir" || return # Write the program's --help output to a file, even if it's empty # This probably only works with GNU tools in general - "$prog" --help </dev/null >help 2>/dev/null || exit + "$prog" --help </dev/null >help 2>/dev/null || return # Iterate through remaining arguments (desired options), creating files to # show they're available if found in the help output diff --git a/sh/shrc.d/prompt.sh b/sh/shrc.d/prompt.sh index a481b5bb..f1b67fb4 100644 --- a/sh/shrc.d/prompt.sh +++ b/sh/shrc.d/prompt.sh @@ -3,3 +3,9 @@ # it to break the export and then just setting them as simple variables unset PS1 PS2 PS3 PS4 PS1='$ ' PS2='> ' PS3='? ' PS4='+ ' + +# If we have an SSH_CLIENT or SSH_CONNECTION environment variable, put the +# username and hostname in PS1 too. +if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_CONNECTION" ] ; then + PS1=$(id -nu)'@'$(hostname)'$ ' +fi diff --git a/vim/after/ftdetect/muttrc.vim b/vim/after/ftdetect/muttrc.vim new file mode 100644 index 00000000..ff3776b5 --- /dev/null +++ b/vim/after/ftdetect/muttrc.vim @@ -0,0 +1,12 @@ +" Add automatic commands to detect .muttrc files +augroup dfmuttrc + + autocmd BufNewFile,BufRead + \ **/.dotfiles/mutt/muttrc.d/*.rc + \ setlocal filetype=muttrc + + autocmd BufNewFile,BufRead + \ **/.muttrc.d/*.rc + \ setlocal filetype=muttrc + +augroup END diff --git a/vim/bundle/html5 b/vim/bundle/html5 -Subproject 21ce415bd93225c3b10010b650652f07dd22912 +Subproject 6a5cc0511776b69994b5e3bb2cacccbb81fa846 diff --git a/zsh/zshrc.d/prompt.zsh b/zsh/zshrc.d/prompt.zsh index f374dbec..446e336e 100644 --- a/zsh/zshrc.d/prompt.zsh +++ b/zsh/zshrc.d/prompt.zsh @@ -44,10 +44,13 @@ prompt() { # Revert to simple inexpensive prompts off) - PS1='\$ ' + PS1='$ ' PS2='> ' PS3='? ' PS4='+ ' + if [[ -n $SSH_CLIENT || -n $SSH_CONNECTION ]] ; then + PS1=$(id -nu)'@'$(hostname -s)'$ ' + fi ;; # Git prompt function |