Can plain sh do tab completion?

Well, I'm pressing the TAB key and nothing happens :p

set -o also doesn't give anything relative to tab completion.

Does sh(1) have tab completion or not? And if yes, how do I enable it?

(I know that tcsh(1) has tab completion. It's working fine.)
 
Last edited by a moderator:
Well, I'm pressing the TAB key and nothing happens :p

set -o also doesn't give anything relative to tab completion.

Does sh have tab completion or not? And if yes, how do I enable it?

(I know that tcsh has tab completion. It's working fine.)
sh()

My man on OpenBSD machine has this paragraph

Code:
  vi-tabcomplete  In vi command-line editing, do command and file
                                       name completion when tab (^I) is  entered                  
                                      in insert mode.
 
sh()

My man on OpenBSD machine has this paragraph

Code:
  vi-tabcomplete  In vi command-line editing, do command and file
                                       name completion when tab (^I) is  entered               
                                      in insert mode.
sh(1) on OpenBSD is really just pdksh. To quote OpenBSD's man page:
NOTES
sh is implemented as a run-time option of pdksh, with only those sh fea-
tures whose syntax or semantics are incompatible with a traditional
Bourne shell disabled. Since this leaves some sh extensions exposed,
caution should be used where backwards compatibility with traditional
Bourne or POSIX compliant shells is an issue.

As far as I'm aware, sh(1) does not have tab command completion.
 
sh(1) on OpenBSD is really just pdksh.
Are you 100% sure about that? Of course I am aware that I am using pdksh which is also default for root account but I would swear that I also have Bourne shell for scripts. Please see



Code:
predrag@oko$ man sh
SH(1)  General Commands Manual  SH(1)

NAME
  sh - public domain Bourne shell

SYNOPSIS
  sh [-+abCefhiklmnpruvXx] [-+o option]
  [-c string | -s | file [argument ...]]

Code:
predrag@oko$ man ksh
KSH(1)  General Commands Manual  KSH(1)

NAME
  ksh - public domain Korn shell

SYNOPSIS
  ksh [-+abCefhiklmnpruvXx] [-+o option]
  [-c string | -s | file [argument ...]]

and I personally write scripts in shells/ksh93
 
Back
Top