diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2015-06-28 15:04:23 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2015-06-28 15:04:23 +0200 |
commit | dbd19df24a6875fa26877db3cb2367a45420fbb0 (patch) | |
tree | 4a383cf7c981f87fca962b24931dccb711e2651b | |
parent | f77720de112b67825054589ef6ee0ae1f349cabc (diff) | |
parent | 41cfc496aa3ad1d4cea6d15afbec130b21e3a32c (diff) |
Merge pull request #31 from matthiasbeyer/fix-#22
Fix: move path removing to helper
-rwxr-xr-x | nix-script | 3 | ||||
-rw-r--r-- | nix-utils.sh | 3 |
2 files changed, 3 insertions, 3 deletions
@@ -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() { |