@@ -183,12 +183,12 @@ fn option_details_for_path(cmd: &Command, path: &str) -> String {
183183 if o. get_value_hint ( ) == ValueHint :: FilePath {
184184 v. extend ( [
185185 "local oldifs" . to_string ( ) ,
186- "if [[ -v IFS ]] ; then" . to_string ( ) ,
186+ r# "if [ -n "${ IFS+x}" ] ; then"# . to_string ( ) ,
187187 r#" oldifs="$IFS""# . to_string ( ) ,
188188 "fi" . to_string ( ) ,
189189 r#"IFS=$'\n'"# . to_string ( ) ,
190190 format ! ( "COMPREPLY=({})" , vals_for( o) ) ,
191- "if [[ -v oldifs ]] ; then" . to_string ( ) ,
191+ r# "if [ -n "${ oldifs+x}" ] ; then"# . to_string ( ) ,
192192 r#" IFS="$oldifs""# . to_string ( ) ,
193193 "fi" . to_string ( ) ,
194194 ] ) ;
@@ -216,12 +216,12 @@ fn option_details_for_path(cmd: &Command, path: &str) -> String {
216216 if o. get_value_hint ( ) == ValueHint :: FilePath {
217217 v. extend ( [
218218 "local oldifs" . to_string ( ) ,
219- "if [[ -v IFS ]] ; then" . to_string ( ) ,
219+ r# "if [ -n "${ IFS+x}" ] ; then"# . to_string ( ) ,
220220 r#" oldifs="$IFS""# . to_string ( ) ,
221221 "fi" . to_string ( ) ,
222222 r#"IFS=$'\n'"# . to_string ( ) ,
223223 format ! ( "COMPREPLY=({})" , vals_for( o) ) ,
224- "if [[ -v oldifs ]] ; then" . to_string ( ) ,
224+ r# "if [ -n "${ oldifs+x}" ] ; then"# . to_string ( ) ,
225225 r#" IFS="$oldifs""# . to_string ( ) ,
226226 "fi" . to_string ( ) ,
227227 ] ) ;
0 commit comments