aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2013-06-26 05:50:13 +0200
committerMattias Andrée <maandree@operamail.com>2013-06-26 05:50:13 +0200
commit8649fd97b234c258613a1d17d2f4849bbb8bdf40 (patch)
treeba3000381e11e327b379cf650b11c6b0ced7f338
parentadd test for python version (diff)
downloadargparser-8649fd97b234c258613a1d17d2f4849bbb8bdf40.tar.gz
argparser-8649fd97b234c258613a1d17d2f4849bbb8bdf40.tar.bz2
argparser-8649fd97b234c258613a1d17d2f4849bbb8bdf40.tar.xz
add default value 1 for lvl in args_parent_name in bash version
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--src/argparser.bash3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/argparser.bash b/src/argparser.bash
index 8b4a85a..1e79d50 100644
--- a/src/argparser.bash
+++ b/src/argparser.bash
@@ -133,6 +133,9 @@ function args_dispose
function args_parent_name
{
local pid=$$ lvl=$1 found=0 line arg
+ if [ "${lvl}" = "" ]; then
+ lvl=1
+ fi
while (( $lvl > 0 )) && [ $found = 0 ]; do
while read line; do
if [ "${line:5}" = "PPid:" ]; then