Using """x""" is identical to "x"

This commit is contained in:
Tyler Akins
2015-06-12 13:27:42 -05:00
parent 01e681035d
commit db9b2eef60
5 changed files with 21 additions and 21 deletions

View File

@@ -351,7 +351,7 @@ function which_vcs() {
# Is this file in the current repo? # Is this file in the current repo?
function is_in_vcs() { function is_in_vcs() {
is_in_$(which_vcs) """$@""" is_in_$(which_vcs) "$@"
} }
# Mercurial # Mercurial
function is_in_hg() { function is_in_hg() {
@@ -405,23 +405,23 @@ function is_in_unknown() {
# Add a file to the repo (but don't commit it). # Add a file to the repo (but don't commit it).
function vcs_add() { function vcs_add() {
vcs_add_$(which_vcs) """$@""" vcs_add_$(which_vcs) "$@"
} }
# Mercurial # Mercurial
function vcs_add_hg() { function vcs_add_hg() {
hg add """$@""" hg add "$@"
} }
# Git # Git
function vcs_add_git() { function vcs_add_git() {
git add """$@""" git add "$@"
} }
# Subversion # Subversion
function vcs_add_svn() { function vcs_add_svn() {
svn add --parents """$@""" svn add --parents "$@"
} }
# Perfoce # Perfoce
function vcs_add_p4() { function vcs_add_p4() {
p4 add """$@""" p4 add "$@"
} }
# No repo # No repo
function vcs_add_unknown() { function vcs_add_unknown() {
@@ -431,23 +431,23 @@ function vcs_add_unknown() {
# Commit a file to the repo # Commit a file to the repo
function vcs_commit() { function vcs_commit() {
vcs_commit_$(which_vcs) """$@""" vcs_commit_$(which_vcs) "$@"
} }
# Mercurial # Mercurial
function vcs_commit_hg() { function vcs_commit_hg() {
hg commit -m"""$@""" hg commit -m"$@"
} }
# Git # Git
function vcs_commit_git() { function vcs_commit_git() {
git commit -m"""$@""" git commit -m"$@"
} }
# Subversion # Subversion
function vcs_commit_svn() { function vcs_commit_svn() {
svn commit -m"""$@""" svn commit -m"$@"
} }
# Perforce # Perforce
function vcs_commit_p4() { function vcs_commit_p4() {
p4 submit -d """$@""" p4 submit -d "$@"
} }
# No repo # No repo
function vcs_commit_unknown() { function vcs_commit_unknown() {
@@ -458,23 +458,23 @@ function vcs_commit_unknown() {
# Remove file from repo, even if it was deleted locally already. # Remove file from repo, even if it was deleted locally already.
# If it doesn't exist yet in the repo, it should be a no-op. # If it doesn't exist yet in the repo, it should be a no-op.
function vcs_remove() { function vcs_remove() {
vcs_remove_$(which_vcs) """$@""" vcs_remove_$(which_vcs) "$@"
} }
# Mercurial # Mercurial
function vcs_remove_hg() { function vcs_remove_hg() {
hg rm -A -- """$@""" hg rm -A -- "$@"
} }
# Git # Git
function vcs_remove_git() { function vcs_remove_git() {
git rm --ignore-unmatch -f -- """$@""" git rm --ignore-unmatch -f -- "$@"
} }
# Subversion # Subversion
function vcs_remove_svn() { function vcs_remove_svn() {
svn delete """$@""" svn delete "$@"
} }
# Perforce # Perforce
function vcs_remove_p4() { function vcs_remove_p4() {
p4 delete """$@""" p4 delete "$@"
} }
# No repo # No repo
function vcs_remove_unknown() { function vcs_remove_unknown() {

View File

@@ -11,13 +11,13 @@
function debugmsg() { function debugmsg() {
# Log to stderr. # Log to stderr.
echo 1>&2 LOG: """$@""" echo 1>&2 LOG: "$@"
: :
} }
function logit() { function logit() {
# Log to stderr. # Log to stderr.
echo 1>&2 LOG: """$@""" echo 1>&2 LOG: "$@"
} }
function fail_out() { function fail_out() {

View File

@@ -7,7 +7,7 @@ set -e
blackbox_home=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) blackbox_home=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source "${blackbox_home}/_blackbox_common.sh" source "${blackbox_home}/_blackbox_common.sh"
for param in """$@""" ; do for param in "$@" ; do
shreddable=0 shreddable=0
unencrypted_file=$(get_unencrypted_filename "$param") unencrypted_file=$(get_unencrypted_filename "$param")
if [[ ! -e "$unencrypted_file" ]]; then if [[ ! -e "$unencrypted_file" ]]; then

View File

@@ -7,7 +7,7 @@ set -e
blackbox_home=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) blackbox_home=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source "${blackbox_home}/_blackbox_common.sh" source "${blackbox_home}/_blackbox_common.sh"
for param in """$@""" ; do for param in "$@" ; do
unencrypted_file=$(get_unencrypted_filename "$param") unencrypted_file=$(get_unencrypted_filename "$param")
if ! is_on_cryptlist "$param" && ! is_on_cryptlist "$unencrypted_file" ; then if ! is_on_cryptlist "$param" && ! is_on_cryptlist "$unencrypted_file" ; then
read -r -p "Encrypt file $param? (y/n) " ans read -r -p "Encrypt file $param? (y/n) " ans

View File

@@ -8,7 +8,7 @@ set -e
blackbox_home=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) blackbox_home=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source "${blackbox_home}/_blackbox_common.sh" source "${blackbox_home}/_blackbox_common.sh"
for param in """$@""" ; do for param in "$@" ; do
unencrypted_file=$(get_unencrypted_filename "$param") unencrypted_file=$(get_unencrypted_filename "$param")
encrypted_file=$(get_encrypted_filename "$param") encrypted_file=$(get_encrypted_filename "$param")
echo >&2 ========== PLAINFILE '"'$unencrypted_file'"' echo >&2 ========== PLAINFILE '"'$unencrypted_file'"'