02-16-2010
Tab completion more than a little off in Cygwin anyway...
I've found there's a few quirks and foibles with tab completion in Cygwin, even without involving string-parsing commands like awk, grep or sed. There are occasions, unpredictable and often inexplicable, when it will or won't work, and there have been times when I've had it work in a four- or five hour long session, logged out or closed my rxvt, come back an hour later and couldn't get a single tab to complete, even though my command syntax and patterns were indistinguishable from the ones I used in that long session only hours before.
I guess these are among the final side-effects of Bill Gates walking out of that legendary meeting with the IBM brass, having told them he was going with Windows 98 as his flagship product instead of NT. When even the best-intentioned developers try to fit a Unix skin on something that's bound to resist "wearing" the "monkey suit" of unadulterated POSIX/ISO at every turn, funny things are bound to happen. Let's not forget what cygpath -unix does to a string that describes a Windows path: the first thing it adds is /cygdrive/. That, from where I sit, is not Unix, will never be Unix, and just shows how many concessions, end-runs and workarounds the Cygwin coders had to resort to to get XP and Vista to "wear" the aforenamed "monkey suit."
But back to the topic of the thread.
If you don't get any further with this, chalk it up to the idiosyncrasies of both Cygwin and Windows and find something else to do, is my advice.
BZT
PS: Sorry to insinuate my mini-rant in your thread.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all,
I recently discovered the ! command. I think it's great that !cd ? will match the last command that began with cd ?. However, for ! to be particularly useful to me (for now anyway) it would be nice if there was a tab completion option available (as with the cd command). Does anyone know... (3 Replies)
Discussion started by: x-375HK-x
3 Replies
2. UNIX for Dummies Questions & Answers
Hi,
Is there a way to turn on tab completetion on Solaris 10? (2 Replies)
Discussion started by: annointed3
2 Replies
3. UNIX for Dummies Questions & Answers
Hello all
How do you configure unix terminal to list files as you tab complete. I'm using a unix terminal at work and when i first started tab complete on a folder would list all matches if there were more than one.
eg.
monkey.xml
mon.xml
monkeyboy.xml
in one folder if i cd into... (2 Replies)
Discussion started by: GNUless
2 Replies
4. Shell Programming and Scripting
Is it possible to set up my .cshrc so that a single tab attempts to autocomplete, while a double tab gives a list of all possible options. In other words, I want it to work like bash in this regard.
Thanks! (3 Replies)
Discussion started by: James McMurray
3 Replies
5. HP-UX
hello,
i'm a linux zealot (fedora), so i know a some about unix. the company i work for uses HP-UX though and there are a few quirks i'd like smooth out by making them work more like my beloved redhat type systems...=)
right now they have all users using ksh and completion is done by hitting... (4 Replies)
Discussion started by: clockworks
4 Replies
6. Shell Programming and Scripting
Is there a way to link a script in my ~/bin with file extension priority for tab completion?
for example, if the script I have could only look at .tex files, and I have 6 files in the same directory with the same name, but different extensions:
index.tex index.dvi index.toc ... etc...
it... (0 Replies)
Discussion started by: pyramation
0 Replies
7. Shell Programming and Scripting
hi guys,
i am new to HP unix , i am doing Solaris , i am just asking is there any thing like "bash" in hp unix including tab completion? (8 Replies)
Discussion started by: dagigg
8 Replies
8. UNIX for Advanced & Expert Users
I'm running Mac OS, using the latest version of zsh.
I've noticed that I have funny tab-completion behavior when inside a screen session.
Specifically, once I press tab, the first part of my command seems to be duplicated before the completion results are inserted.
For example, if I type... (14 Replies)
Discussion started by: marshaul
14 Replies
9. Windows & DOS: Issues & Discussions
Hi,
I am using cygwin on windows machine. Tab completion works as expected in almost all areas, except for when I use tilda (~) to access files/dir under my home dir. When i type 'cd ~/' and hit TAB nothing happens, no completion options are given.
I can type just 'cd' and it will change to... (4 Replies)
Discussion started by: centerback
4 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I'm having a problem with tab completion at the bash command line. For some reason, whenever I type g<tab>, the terminal will freeze up for 5-10 seconds before asking me if I want to display all 325 possibilities. I thought that maybe it's because of the high number of commands, but I have... (4 Replies)
Discussion started by: Raz716
4 Replies
LEARN ABOUT SUNOS
unexpand
expand(1) User Commands expand(1)
NAME
expand, unexpand - expand TAB characters to SPACE characters, and vice versa
SYNOPSIS
expand [-t tablist] [file...]
expand [-tabstop] [ -tab1, tab2,. . ., tabn] [file...]
unexpand [-a] [-t tablist] [file...]
DESCRIPTION
The expand utility copies files (or the standard input) to the standard output, with TAB characters expanded to SPACE characters. BACKSPACE
characters are preserved into the output and decrement the column count for TAB calculations. expand is useful for pre-processing character
files (before sorting, looking at specific columns, and so forth) that contain TAB characters.
unexpand copies files (or the standard input) to the standard output, putting TAB characters back into the data. By default, only leading
SPACE and TAB characters are converted to strings of tabs, but this can be overridden by the -a option (see the OPTIONS section below).
OPTIONS
The following options are supported for expand:
-t tablist Specifies the tab stops. The argument tablist must consist of a single positive decimal integer or multiple posi-
tive decimal integers, separated by blank characters or commas, in ascending order. If a single number is given,
tabs will be set tablist column positions apart instead of the default 8. If multiple numbers are given, the tabs
will be set at those specific column positions.
Each tab-stop position N must be an integer value greater than zero, and the list must be in strictly ascending
order. This is taken to mean that, from the start of a line of output, tabbing to position N causes the next char-
acter output to be in the (N+1)th column position on that line.
In the event of expand having to process a tab character at a position beyond the last of those specified in a mul-
tiple tab-stop list, the tab character is replaced by a single space character in the output.
-tabstop Specifies as a single argument, sets TAB characters tabstop SPACE characters apart instead of the default 8.
-tab1,tab2,...,tabn Sets TAB characters at the columns specified by -tab1,tab2,...,tabn
The following options are supported for unexpand:
-a Inserts TAB characters when replacing a run of two or more SPACE characters would produce a smaller output file.
-t tablist Specifies the tab stops. The option-argument tablist must be a single argument consisting of a single positive decimal
integer or multiple positive decimal integers, separated by blank characters or commas, in ascending order. If a single
number is given, tabs will be set tablist column positions apart instead of the default 8. If multiple numbers are given,
the tabs will be set at those specific column positions. Each tab-stop position N must be an integer value greater than
zero, and the list must be in strictly ascending order. This is taken to mean that, from the start of a line of output,
tabbing to position N will cause the next character output to be in the (N+1)th column position on that line. When the -t
option is not specified, the default is the equivalent of specifying -t 8 (except for the interaction with -a, described
below).
No space-to-tab character conversions occur for characters at positions beyond the last of those specified in a multiple
tab-stop list.
When -t is specified, the presence or absence of the -a option is ignored; conversion will not be limited to the processing
of leading blank characters.
OPERANDS
The following ooperand is supported for expand and unexpand:
file The path name of a text file to be used as input.
ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of expand and unexpand: LANG, LC_ALL,
LC_CTYPE, LC_MESSAGES, and NLSPATH.
EXIT STATUS
The following exit values are returned:
0 Successful completion
>0 An error occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWesu |
+-----------------------------+-----------------------------+
|CSI |enabled |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO
tabs(1), attributes(5), environ(5), standards(5)
SunOS 5.10 1 Feb 1995 expand(1)