summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2015-06-28 15:04:23 +0200
committerMatthias Beyer <mail@beyermatthias.de>2015-06-28 15:04:23 +0200
commitdbd19df24a6875fa26877db3cb2367a45420fbb0 (patch)
tree4a383cf7c981f87fca962b24931dccb711e2651b
parentf77720de112b67825054589ef6ee0ae1f349cabc (diff)
parent41cfc496aa3ad1d4cea6d15afbec130b21e3a32c (diff)
Merge pull request #31 from matthiasbeyer/fix-#22
Fix: move path removing to helper
-rwxr-xr-xnix-script3
-rw-r--r--nix-utils.sh3
2 files changed, 3 insertions, 3 deletions
diff --git a/nix-script b/nix-script
index 3cfc082..cb8f3de 100755
--- a/nix-script
+++ b/nix-script
@@ -92,8 +92,7 @@ then
stdout "Listing commands"
for cmd in $(all_commands)
do
- echo $(scriptname_to_command $cmd | \
- sed -r "s,$(dirname ${BASH_SOURCE[0]})/nix-script-,,")
+ echo $(scriptname_to_command $cmd)
done
exit 0
fi
diff --git a/nix-utils.sh b/nix-utils.sh
index 3ff20df..d087bdf 100644
--- a/nix-utils.sh
+++ b/nix-utils.sh
@@ -13,7 +13,8 @@ stdout() {
}
scriptname_to_command() {
- echo "$1" | sed 's,^\.\/nix-script-,,' | sed 's,\.sh$,,'
+ echo "$1" | sed 's,^\.\/nix-script-,,' | sed 's,\.sh$,,' | \
+ sed -r "s,$(dirname ${BASH_SOURCE[0]})/nix-script-,,"
}
help_synopsis() {