The tag has no wiki summary.

learn more… | top users | synonyms

5
votes
3answers
45 views

How can I make my .bashrc call to shopt -s autocd depend on the bash version?

In Ubuntu I like having shopt -s autocd in my .bashrc file for automatic CD'ing with typing 'cd', i.e. just type the directory name (and probably use tab completion too) and press return and be ...
5
votes
2answers
102 views

How do you get descriptions of the available `shopt` options?

What is the canonical way for accessing the local documentation on any available Shell Options builtin with shopt? I'm using Ubuntu 12.04 and can run help shopt to get a description of what shopt ...
3
votes
1answer
62 views

bash not setting autocd

I try to set autocd option in bash so I don't have to type cd src and can just type src. However shopt -s autocd gives me: -bash: shopt: autocd: invalid shell option name (Ubuntu 8.04 hardy)
4
votes
2answers
224 views

Function caller positional parameters

I need to read and write the positional parameters $@ of a function's caller. The Bash man page says that: A shell function is an object that is called like a simple command and executes a ...
1
vote
1answer
530 views

What are the scope restrictions for setting shopt extglob. and other options?

My non-interactive bash shell has extglob off. I would like to turn it on in the statement immediately before a command, but I have noticed that when shopt -s extglob is within an if .. then .. else ...
17
votes
3answers
1k views

Set and Shopt - Why Two?

set and shopt are both shell builtins that control various options. I often forget which options are set by which command, and occasionally which option sets/unsets (set +o/-o, shopt -s/-u). Why are ...