help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-bash] make function local


From: Peng Yu
Subject: [Help-bash] make function local
Date: Tue, 7 Apr 2015 15:13:47 -0500

Hi, Currently, bash does not support local function. But it might be
helpful to add such a feature, so that function can become a first
class citizen in the language. Could this be considered in the future?


#!/usr/bin/env bash

function f {
local temp=xxxx
local g
function g {
echo in g $temp
}
g
}

set -v
f
g

-- 
Regards,
Peng



reply via email to

[Prev in Thread] Current Thread [Next in Thread]