From 79309afa6f6d8b4f3a607694608b499db6b992fa Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 10 Feb 2014 23:54:25 +1300 Subject: Use space before semicolon as command separator --- bash/bash_logout | 4 ++-- bash/bash_profile | 6 ++--- bash/bashrc | 16 ++++++------- bash/bashrc.d/cd.bash | 10 ++++---- bash/bashrc.d/cf.bash | 6 ++--- bash/bashrc.d/ed.bash | 4 ++-- bash/bashrc.d/ftp.bash | 10 ++++---- bash/bashrc.d/git.bash | 2 +- bash/bashrc.d/gnupg.bash | 6 ++--- bash/bashrc.d/grep.bash | 6 ++--- bash/bashrc.d/keychain.bash | 2 +- bash/bashrc.d/ls.bash | 2 +- bash/bashrc.d/mysql.bash | 6 ++--- bash/bashrc.d/pass.bash | 16 ++++++------- bash/bashrc.d/prompt.bash | 58 ++++++++++++++++++++++----------------------- bash/bashrc.d/ssh.bash | 8 +++---- bash/bashrc.d/tmux.bash | 4 ++-- bash/bashrc.d/vim.bash | 12 +++++----- sh/profile | 8 +++---- sh/profile.d/browser.sh | 2 +- sh/profile.d/keychain.sh | 6 ++--- sh/profile.d/ls.sh | 2 +- 22 files changed, 98 insertions(+), 98 deletions(-) diff --git a/bash/bash_logout b/bash/bash_logout index 2cffa5f8..01905f99 100644 --- a/bash/bash_logout +++ b/bash/bash_logout @@ -1,10 +1,10 @@ # Give up completely if no BASH_VERSINFO (<2.0) -if [ -z "$BASH_VERSINFO" ]; then +if [ -z "$BASH_VERSINFO" ] ; then return fi # Clear console if possible when logging out -if ((SHLVL == 1)); then +if ((SHLVL == 1)) ; then clear_console -q 2>/dev/null fi diff --git a/bash/bash_profile b/bash/bash_profile index 038f370c..bd80dba6 100644 --- a/bash/bash_profile +++ b/bash/bash_profile @@ -1,5 +1,5 @@ # Give up completely if no BASH_VERSINFO (<2.0) -if [ -z "$BASH_VERSINFO" ]; then +if [ -z "$BASH_VERSINFO" ] ; then printf \ '%s: %s is too old to work with this configuration.\n' \ "${BASH##*/}" "$BASH_VERSION" >&2 @@ -7,12 +7,12 @@ if [ -z "$BASH_VERSINFO" ]; then fi # Source Bourne shell profile if it exists -if [[ -r $HOME/.profile ]]; then +if [[ -r $HOME/.profile ]] ; then source "$HOME"/.profile fi # Source interactive Bash config if it exists -if [[ -r $HOME/.bashrc ]]; then +if [[ -r $HOME/.bashrc ]] ; then source "$HOME"/.bashrc fi diff --git a/bash/bashrc b/bash/bashrc index 0d68f01f..09edf801 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -1,5 +1,5 @@ # Give up completely if no BASH_VERSINFO (<2.0) -if [ -z "$BASH_VERSINFO" ]; then +if [ -z "$BASH_VERSINFO" ] ; then printf \ '%s: %s is too old to work with this configuration.\n' \ "${BASH##*/}" "$BASH_VERSION" >&2 @@ -7,13 +7,13 @@ if [ -z "$BASH_VERSINFO" ]; then fi # Don't do anything if not running interactively -if [[ $- != *i* ]]; then +if [[ $- != *i* ]] ; then return fi # Keep plenty of history; unlimited, if we have >=4.3 if ((${BASH_VERSINFO[0]} >= 4 \ -&& 10#${BASH_VERSINFO[1]%%[![:digit:]]*} >= 3)); then +&& 10#${BASH_VERSINFO[1]%%[![:digit:]]*} >= 3)) ; then HISTFILESIZE=-1 HISTSIZE=-1 else @@ -28,7 +28,7 @@ HISTCONTROL=ignoreboth HISTTIMEFORMAT='%F %T ' # Only tell me about new mail if MAIL is set and in $HOME -if [[ $MAIL == "$HOME"/* ]]; then +if [[ $MAIL == "$HOME"/* ]] ; then MAILCHECK=15 else unset -v MAILCHECK @@ -68,7 +68,7 @@ shopt -s shift_verbose shopt -u sourcepath # These options only exist since Bash 4.0-alpha -if ((${BASH_VERSINFO[0]} >= 4)); then +if ((${BASH_VERSINFO[0]} >= 4)) ; then # Warn me about stopped jobs when exiting shopt -s checkjobs # Autocorrect fudged paths during completion @@ -78,9 +78,9 @@ if ((${BASH_VERSINFO[0]} >= 4)); then fi # Load any supplementary scripts -if [[ -d $HOME/.bashrc.d ]]; then - for config in "$HOME"/.bashrc.d/*.bash; do - if [[ -r $config ]]; then +if [[ -d $HOME/.bashrc.d ]] ; then + for config in "$HOME"/.bashrc.d/*.bash ; do + if [[ -r $config ]] ; then source "$config" fi done diff --git a/bash/bashrc.d/cd.bash b/bash/bashrc.d/cd.bash index 6644bd1a..26cffae0 100644 --- a/bash/bashrc.d/cd.bash +++ b/bash/bashrc.d/cd.bash @@ -3,17 +3,17 @@ cd() { local arg dir endopts local -a opts dirs - for arg in "$@"; do - if [[ $arg == -- ]]; then + for arg in "$@" ; do + if [[ $arg == -- ]] ; then endopts=1 - elif [[ $arg == -* ]] && ! ((endopts)); then + elif [[ $arg == -* ]] && ! ((endopts)) ; then opts=("${opts[@]}" "$arg") else dirs=("${dirs[@]}" "$arg") fi done - if ((${#dirs[@]} == 2)); then - if [[ $PWD == *"${dirs[0]}"* ]]; then + if ((${#dirs[@]} == 2)) ; then + if [[ $PWD == *"${dirs[0]}"* ]] ; then builtin cd "${opts[@]}" \ -- "${PWD/${dirs[0]}/${dirs[1]}}" else diff --git a/bash/bashrc.d/cf.bash b/bash/bashrc.d/cf.bash index cb06aa56..1a375021 100644 --- a/bash/bashrc.d/cf.bash +++ b/bash/bashrc.d/cf.bash @@ -7,15 +7,15 @@ cf() { dir=${1:-$PWD} # Error conditions - if [[ ! -e $dir ]]; then + if [[ ! -e $dir ]] ; then printf 'bash: cf: %s does not exist\n' \ "$dir" >&2 return 1 - elif [[ ! -d $dir ]]; then + elif [[ ! -d $dir ]] ; then printf 'bash: cf: %s is not a directory\n' \ "$dir" >&2 return 1 - elif [[ ! -r $dir ]]; then + elif [[ ! -r $dir ]] ; then printf 'bash: cf: %s is not readable\n' \ "$dir" >&2 return 1 diff --git a/bash/bashrc.d/ed.bash b/bash/bashrc.d/ed.bash index 9f5fb5f2..7cef29e6 100644 --- a/bash/bashrc.d/ed.bash +++ b/bash/bashrc.d/ed.bash @@ -1,5 +1,5 @@ # Bail if no ed(1) -if ! hash ed 2>/dev/null; then +if ! hash ed 2>/dev/null ; then return fi @@ -7,7 +7,7 @@ fi # it feel a lot more like using ex. Only do this when stdin is a terminal, # however. ed() { - if [[ -t 0 ]]; then + if [[ -t 0 ]] ; then command ed -p: "$@" else command ed "$@" diff --git a/bash/bashrc.d/ftp.bash b/bash/bashrc.d/ftp.bash index 4d0e89a6..f0fc5aac 100644 --- a/bash/bashrc.d/ftp.bash +++ b/bash/bashrc.d/ftp.bash @@ -1,5 +1,5 @@ # Bail if no ftp(1) -if ! hash ftp 2>/dev/null; then +if ! hash ftp 2>/dev/null ; then return fi @@ -9,7 +9,7 @@ _ftp() { # Bail if the .netrc file is illegible local netrc=$HOME/.netrc - if [[ ! -r $netrc ]]; then + if [[ ! -r $netrc ]] ; then COMPREPLY=() return 1 fi @@ -21,11 +21,11 @@ _ftp() { # Iterate through tokens and collect machine names local -a machines local token machine - for token in "${tokens[@]}"; do - if ((machine)); then + for token in "${tokens[@]}" ; do + if ((machine)) ; then machines=("${machines[@]}" "$token") machine=0 - elif [[ $token == machine ]]; then + elif [[ $token == machine ]] ; then machine=1 fi done diff --git a/bash/bashrc.d/git.bash b/bash/bashrc.d/git.bash index 91b46f2a..fa40eddf 100644 --- a/bash/bashrc.d/git.bash +++ b/bash/bashrc.d/git.bash @@ -1,5 +1,5 @@ # Bail if no git(1) -if ! hash git 2>/dev/null; then +if ! hash git 2>/dev/null ; then return fi diff --git a/bash/bashrc.d/gnupg.bash b/bash/bashrc.d/gnupg.bash index 8eac0439..ba67a327 100644 --- a/bash/bashrc.d/gnupg.bash +++ b/bash/bashrc.d/gnupg.bash @@ -1,5 +1,5 @@ # Bail if no gpg(1) -if ! hash gpg 2>/dev/null; then +if ! hash gpg 2>/dev/null ; then return fi @@ -20,7 +20,7 @@ _gpg() { local word=${COMP_WORDS[COMP_CWORD]} # Bail if word doesn't start with two dashes - if [[ $word != --* ]]; then + if [[ $word != --* ]] ; then COMPREPLY=() return 1 fi @@ -28,7 +28,7 @@ _gpg() { # Read options from the output of gpg --dump-options local -a options local option - while read -r option; do + while read -r option ; do options=("${options[@]}" "$option") done < <(gpg --dump-options 2>/dev/null) diff --git a/bash/bashrc.d/grep.bash b/bash/bashrc.d/grep.bash index f2a2f5d1..6fffc20c 100644 --- a/bash/bashrc.d/grep.bash +++ b/bash/bashrc.d/grep.bash @@ -11,19 +11,19 @@ grepopts() { grepopts=("${grepopts[@]}" '-I') # If the --exclude option is available, exclude some VCS files - if [[ $grephelp == *--exclude* ]]; then + if [[ $grephelp == *--exclude* ]] ; then grepopts=("${grepopts[@]}" '--exclude=.git{,ignore,modules}') fi # If the --exclude-dir option is available, exclude some VCS dirs - if [[ $grephelp == *--exclude-dir* ]]; then + if [[ $grephelp == *--exclude-dir* ]] ; then grepopts=("${grepopts[@]}" '--exclude-dir=.{cvs,git,hg,svn}') fi # If the --color option is available and we have a terminal that supports # at least eight colors, add --color=auto to the options local colors=$(tput colors) - if [[ $grephelp == *--color* ]] && ((colors >= 8)); then + if [[ $grephelp == *--color* ]] && ((colors >= 8)) ; then grepopts=("${grepopts[@]}" '--color=auto') fi diff --git a/bash/bashrc.d/keychain.bash b/bash/bashrc.d/keychain.bash index 92b3e020..39fe8536 100644 --- a/bash/bashrc.d/keychain.bash +++ b/bash/bashrc.d/keychain.bash @@ -1,5 +1,5 @@ # If TTY/GPG_TTY are set, update them -if [[ $GPG_TTY ]]; then +if [[ $GPG_TTY ]] ; then GPG_TTY=$(tty) fi diff --git a/bash/bashrc.d/ls.bash b/bash/bashrc.d/ls.bash index 51a80d97..0dedfdcc 100644 --- a/bash/bashrc.d/ls.bash +++ b/bash/bashrc.d/ls.bash @@ -10,7 +10,7 @@ lsopts() { # If the --color option is available and we have a terminal that supports # at least eight colors, add --color=auto to the options local colors=$(tput colors) - if [[ $lshelp == *--color* ]] && ((colors >= 8)); then + if [[ $lshelp == *--color* ]] && ((colors >= 8)) ; then lsopts=("${lsopts[@]}" '--color=auto') fi diff --git a/bash/bashrc.d/mysql.bash b/bash/bashrc.d/mysql.bash index 488fb02c..d04b189d 100644 --- a/bash/bashrc.d/mysql.bash +++ b/bash/bashrc.d/mysql.bash @@ -1,5 +1,5 @@ # Bail if no mysql(1) -if ! hash mysql 2>/dev/null; then +if ! hash mysql 2>/dev/null ; then return fi @@ -15,7 +15,7 @@ fi # mysql() { local config="$HOME"/.mysql/"$1".cnf - if [[ -r $config ]]; then + if [[ -r $config ]] ; then shift command mysql --defaults-extra-file="$config" "$@" else @@ -34,7 +34,7 @@ _mysql() { shopt -s nullglob dotglob files=("$dir"/*.cnf) ((! ${#files[@]})) - ); then + ) ; then COMPREPLY=() return 1 fi diff --git a/bash/bashrc.d/pass.bash b/bash/bashrc.d/pass.bash index 2cd25cb9..6c403d1c 100644 --- a/bash/bashrc.d/pass.bash +++ b/bash/bashrc.d/pass.bash @@ -1,5 +1,5 @@ # Bail if no pass(1) -if ! hash pass 2>/dev/null; then +if ! hash pass 2>/dev/null ; then return fi @@ -15,18 +15,18 @@ _pass() local IFS=$'\n' local items=( $(compgen -f "$prefix"/"$word") ) local item - for item in "${items[@]}"; do - if [[ $item == "$prefix"/.* ]]; then + for item in "${items[@]}" ; do + if [[ $item == "$prefix"/.* ]] ; then continue fi # If there is a unique match, and it is a directory with one entry, then # recursively autocomplete the subentry as well - if ((${#items[@]} == 1)); then + if ((${#items[@]} == 1)) ; then local subitems - while [[ -d $item ]]; do + while [[ -d $item ]] ; do subitems=( $(compgen -f "$item"/) ) - if ((${#subitems[@]} == 1)); then + if ((${#subitems[@]} == 1)) ; then item=${subitems[0]} else break @@ -35,7 +35,7 @@ _pass() fi # Append slash to directories - if [[ -d $item ]]; then + if [[ -d $item ]] ; then item=$item/ fi @@ -47,7 +47,7 @@ _pass() } # Completion only has -o nospace in Bash >=3.0 -if ((${BASH_VERSINFO[0]} >= 3)); then +if ((${BASH_VERSINFO[0]} >= 3)) ; then complete -o filenames -o nospace -F _pass pass else complete -o filenames -F _pass pass diff --git a/bash/bashrc.d/prompt.bash b/bash/bashrc.d/prompt.bash index 0214792e..c9b7f613 100644 --- a/bash/bashrc.d/prompt.bash +++ b/bash/bashrc.d/prompt.bash @@ -11,7 +11,7 @@ prompt() { PS1='[\u@\h:\w]$(prompt vcs)$(prompt job)$(prompt ret)\$' # If Bash 4.0 is available, trim very long paths in prompt - if ((${BASH_VERSINFO[0]} >= 4)); then + if ((${BASH_VERSINFO[0]} >= 4)) ; then PROMPT_DIRTRIM=4 fi @@ -25,14 +25,14 @@ prompt() { local format # Check if we have non-bold bright green available - if ((colors == 256)); then + if ((colors == 256)) ; then format=$( { tput AF 10 || tput setaf 10 \ || tput AF 10 0 0 || tput setaf 10 0 0 } 2>/dev/null ) # If we have only eight colors, use bold green to make it bright - elif ((colors == 8)); then + elif ((colors == 8)) ; then format=$( { tput AF 2 || tput setaf 2 tput md || tput bold @@ -57,7 +57,7 @@ prompt() { git) # Bail if we have no git(1) - if ! hash git 2>/dev/null; then + if ! hash git 2>/dev/null ; then return 1 fi @@ -67,7 +67,7 @@ prompt() { git symbolic-ref --quiet HEAD \ || git rev-parse --short HEAD } 2>/dev/null ) - if [[ ! $branch ]]; then + if [[ ! $branch ]] ; then return 1 fi branch=${branch##*/} @@ -75,32 +75,32 @@ prompt() { # Safely read status with -z --porcelain local line local -i ready modified untracked - while IFS= read -d $'\0' -r line; do - if [[ $line == [MADRC]* ]]; then + while IFS= read -d $'\0' -r line ; do + if [[ $line == [MADRC]* ]] ; then ready=1 fi - if [[ $line == ?[MADRC]* ]]; then + if [[ $line == ?[MADRC]* ]] ; then modified=1 fi - if [[ $line == '??'* ]]; then + if [[ $line == '??'* ]] ; then untracked=1 fi done < <(git status -z --porcelain 2>/dev/null) # Build state array from status output flags local -a state - if [[ $ready ]]; then + if [[ $ready ]] ; then state=("${state[@]}" '+') fi - if [[ $modified ]]; then + if [[ $modified ]] ; then state=("${state[@]}" '!') fi - if [[ $untracked ]]; then + if [[ $untracked ]] ; then state=("${state[@]}" '?') fi # Add another indicator if we have stashed changes - if git rev-parse --verify refs/stash >/dev/null 2>&1; then + if git rev-parse --verify refs/stash >/dev/null 2>&1 ; then state=("${state[@]}" '^') fi @@ -112,13 +112,13 @@ prompt() { # Mercurial prompt function hg) # Bail if we have no hg(1) - if ! hash hg 2>/dev/null; then + 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 + if ! branch=$(hg branch 2>/dev/null) ; then return 1 fi @@ -128,8 +128,8 @@ prompt() { # Safely read status with -0 local line local -i modified untracked - while IFS= read -d $'\0' -r line; do - if [[ $line == '?'* ]]; then + while IFS= read -d $'\0' -r line ; do + if [[ $line == '?'* ]] ; then untracked=1 else modified=1 @@ -138,10 +138,10 @@ prompt() { # Build state array from status output flags local -a state - if [[ $modified ]]; then + if [[ $modified ]] ; then state=("${state[@]}" '!') fi - if [[ $untracked ]]; then + if [[ $untracked ]] ; then state=("${state[@]}" '?') fi @@ -153,13 +153,13 @@ prompt() { # Subversion prompt function svn) # Bail if we have no svn(1) - if ! hash svn 2>/dev/null; then + if ! hash svn 2>/dev/null ; then return 1 fi # Determine the repository URL and root directory local key value url root - while IFS=: read -r key value; do + while IFS=: read -r key value ; do case $key in 'URL') url=${value## } @@ -171,7 +171,7 @@ prompt() { done < <(svn info 2>/dev/null) # Exit if we couldn't get either - if ! [[ $url && $root ]]; then + if ! [[ $url && $root ]] ; then return 1 fi @@ -187,8 +187,8 @@ prompt() { # Parse the output of svn status to determine working copy state local symbol local -i modified untracked - while read -r symbol _; do - if [[ $symbol == *'?'* ]]; then + while read -r symbol _ ; do + if [[ $symbol == *'?'* ]] ; then untracked=1 else modified=1 @@ -197,10 +197,10 @@ prompt() { # Add appropriate state flags local -a state - if [[ $modified ]]; then + if [[ $modified ]] ; then state=("${state[@]}" '!') fi - if [[ $untracked ]]; then + if [[ $untracked ]] ; then state=("${state[@]}" '?') fi @@ -216,7 +216,7 @@ prompt() { # Show the return status of the last command in angle brackets ret) - if ((ret > 0)); then + if ((ret > 0)) ; then printf '<%d>' "$ret" fi ;; @@ -224,10 +224,10 @@ prompt() { # Show the count of background jobs in curly brackets job) local -i jobc=0 - while read -r _; do + while read -r _ ; do ((jobc++)) done < <(jobs -p) - if ((jobc > 0)); then + if ((jobc > 0)) ; then printf '{%d}' "$jobc" fi ;; diff --git a/bash/bashrc.d/ssh.bash b/bash/bashrc.d/ssh.bash index 1520a849..2daefa72 100644 --- a/bash/bashrc.d/ssh.bash +++ b/bash/bashrc.d/ssh.bash @@ -1,5 +1,5 @@ # Bail if no ssh(1) -if ! hash ssh 2>/dev/null; then +if ! hash ssh 2>/dev/null ; then return fi @@ -18,7 +18,7 @@ _ssh() { # Bail if the configuration file is illegible local config=$HOME/.ssh/config - if [[ ! -r $config ]]; then + if [[ ! -r $config ]] ; then COMPREPLY=() return 1 fi @@ -26,8 +26,8 @@ _ssh() { # Read hostnames from the file, no asterisks local -a hosts local option value - while read -r option value _; do - if [[ $option == Host && $value != *'*'* ]]; then + while read -r option value _ ; do + if [[ $option == Host && $value != *'*'* ]] ; then hosts=("${hosts[@]}" "$value") fi done < "$config" diff --git a/bash/bashrc.d/tmux.bash b/bash/bashrc.d/tmux.bash index 0a3c2743..50a45ee2 100644 --- a/bash/bashrc.d/tmux.bash +++ b/bash/bashrc.d/tmux.bash @@ -1,5 +1,5 @@ # Bail if no tmux(1) -if ! hash tmux 2>/dev/null; then +if ! hash tmux 2>/dev/null ; then return fi @@ -7,7 +7,7 @@ fi tmux() { # If sessions exist, default the arguments to the attach-session command - if ! (($#)) && command tmux has-session 2>/dev/null; then + if ! (($#)) && command tmux has-session 2>/dev/null ; then command tmux attach-session -d # Otherwise, just call tmux directly with the given arguments diff --git a/bash/bashrc.d/vim.bash b/bash/bashrc.d/vim.bash index 036dc1da..b929cf80 100644 --- a/bash/bashrc.d/vim.bash +++ b/bash/bashrc.d/vim.bash @@ -1,5 +1,5 @@ # Bail if no vim(1) -if ! hash vim 2>/dev/null; then +if ! hash vim 2>/dev/null ; then return fi @@ -15,10 +15,10 @@ vis() { # Distinguish options from file arguments endopts=0 - for arg in "$@"; do - if [[ $arg == -- ]]; then + for arg in "$@" ; do + if [[ $arg == -- ]] ; then endopts=1 - elif [[ $arg == -* ]] && ! ((endopts)); then + elif [[ $arg == -* ]] && ! ((endopts)) ; then opts=("${opts[@]}" "$arg") else cmds=("${cmds[@]}" "$arg") @@ -26,9 +26,9 @@ vis() { done # Check all the commands, if they don't exist, we'll create them - for cmd in "${cmds[@]}"; do + for cmd in "${cmds[@]}" ; do file=$(type -p "${cmd##*/}") - if [[ ! $file ]]; then + if [[ ! $file ]] ; then mkdir -p "$HOME"/.local/bin || exit file="$HOME"/.local/bin/"${cmd##*/}" fi diff --git a/sh/profile b/sh/profile index 17a93772..0440ee71 100644 --- a/sh/profile +++ b/sh/profile @@ -1,13 +1,13 @@ # Add ~/.local/bin to PATH if it exists -if [ -d "$HOME"/.local/bin ]; then +if [ -d "$HOME"/.local/bin ] ; then PATH="$HOME"/.local/bin:"$PATH" fi export PATH # Load all supplementary scripts in ~/.profile.d -if [ -d "$HOME"/.profile.d ]; then - for config in "$HOME"/.profile.d/*.sh; do - if [ -r "$config" ]; then +if [ -d "$HOME"/.profile.d ] ; then + for config in "$HOME"/.profile.d/*.sh ; do + if [ -r "$config" ] ; then . "$config" fi done diff --git a/sh/profile.d/browser.sh b/sh/profile.d/browser.sh index 3b03b3d6..9d5919eb 100644 --- a/sh/profile.d/browser.sh +++ b/sh/profile.d/browser.sh @@ -1,5 +1,5 @@ # Browser -if [ -n "$DISPLAY" ]; then +if [ -n "$DISPLAY" ] ; then BROWSER=firefox else BROWSER=lynx diff --git a/sh/profile.d/keychain.sh b/sh/profile.d/keychain.sh index e4733aff..cde71792 100644 --- a/sh/profile.d/keychain.sh +++ b/sh/profile.d/keychain.sh @@ -1,16 +1,16 @@ # ssh-askpass setup -if command -v ssh-askpass >/dev/null 2>&1; then +if command -v ssh-askpass >/dev/null 2>&1 ; then SSH_ASKPASS=$(command -v ssh-askpass) export SSH_ASKPASS fi # keychain setup -if command -v keychain >/dev/null 2>&1; then +if command -v keychain >/dev/null 2>&1 ; then eval "$(TERM=${TERM:-ansi} keychain \ --eval --ignore-missing --quiet id_dsa id_rsa id_ecsda)" # Set and export TTY/GPG_TTY for interactive shells - if [ -t 0 ]; then + if [ -t 0 ] ; then GPG_TTY=$(tty) export GPG_TTY fi diff --git a/sh/profile.d/ls.sh b/sh/profile.d/ls.sh index c00d815d..f99a59f4 100644 --- a/sh/profile.d/ls.sh +++ b/sh/profile.d/ls.sh @@ -1,5 +1,5 @@ # Define and store appropriate colors for ls -if command -v dircolors >/dev/null 2>&1; then +if command -v dircolors >/dev/null 2>&1 ; then eval "$(dircolors --sh)" fi -- cgit v1.2.3