07-13-2004
As for colour syntax highlighting - this is because HP-UX uses
vi , not
vim - vi doesn't have syntax highlighting - this is a VI iMproved feature..... As long as you're using an ANSI compliant terminal then colour will "work" - (try
my "cecho" script )
And as for tab filename completion, this is a shell issue. The public domain Korn Shell (pdksh) has a vi-tabcomplete option, but the "real" ksh as supplied with HP-UX does not. You can either use ESC twice, or ESC then \ to do completion.
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. Shell Programming and Scripting
I really like tcsh's:
set completion='enhanced'
because it treats underscores and dash signs the same. I don't have to reach for the shift key when trying to complete files that have underscores. As far as I know, there is nothing like this in bash.
Does such a thing exist in bash? If... (2 Replies)
Discussion started by: sarnobat
2 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 Desktop Questions & Answers
Hi there,
I ve been using cygwin for some time now without any problems. However, recently I ve mapped a new drive on Windows and are now having problems with TAB completion for awk scripts in cygwin on this newly mapped drive (cygdrive t). I can access and run all files but cygwin doesn't do... (5 Replies)
Discussion started by: Tommes
5 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 DEBIAN
colordiff
COLORDIFF(1) COLORDIFF(1)
NAME
colordiff - a tool to colorize diff output
SYNOPSIS
colordiff [diff options] [colordiff options] {file1} {file2}
DESCRIPTION
colordiff is a wrapper for diff and produces the same output as diff but with coloured syntax highlighting at the command line to improve
readability. The output is similar to how a diff-generated patch might appear in Vim or Emacs with the appropriate syntax highlighting
options enabled. The colour schemes can be read from a central configuration file or from a local user ~/.colordiffrc file.
colordiff makes use of ANSI colours and as such will only work when ANSI colours can be used - typical examples are xterms and Eterms, as
well as console sessions.
colordiff has been tested on various flavours of Linux and under OpenBSD, but should be broadly portable to other systems.
USAGE
Use colordiff wherever you would normally use diff, or pipe output to colordiff:
For example:
$ colordiff file1 file2
$ diff -u file1 file2 | colordiff
You can pipe the output to 'less', using the '-R' option (some systems or terminal types may get better results using '-r' instead), which
keeps the colour escape sequences, otherwise displayed incorrectly or discarded by 'less':
$ diff -u file1 file2 | colordiff | less -R
If you have wdiff installed, colordiff will correctly colourise the added and removed text, provided that the '-n' option is given to
wdiff:
$ wdiff -n file1 file2 | colordiff
You may find it useful to make diff automatically call colordiff. Add the following line to ~/.bashrc (or equivalent):
alias diff=colordiff
Any options passed to colordiff are passed through to diff except for the colordiff-specific option 'difftype', e.g.
colordiff --difftype=debdiff file1 file2
Valid values for 'difftype' are: diff, diffc, diffu, diffy, wdiff, debdiff; these correspond to plain diffs, context diffs, unified diffs,
side-by-side diffs, wdiff output and debdiff output respectively. Use these overrides when colordiff is not able to determine the diff-type
automatically.
Alternatively, a construct such as 'cvs diff SOMETHING | colordiff' can be included in ~/.bashrc as follows:
function cvsdiff () { cvs diff $@ | colordiff; }
Or, combining the idea above using 'less':
function cvsdiff () { cvs diff $@ | colordiff |less -R; }
Note that the function name, cvsdiff, can be customized.
FILES
/etc/colordiffrc
Central configuration file. User-specific settings can be enabled by copying this file to ~/.colordiffrc and making the appropriate
changes.
colordiffrc-lightbg
Alternate configuration template for use with terminals having light backgrounds. Copy this to /etc/colordiffrc or ~/.colordiffrc and
customize.
BUGS
Bug reports and suggestions/patches to <davee@sungate.co.uk> please.
AUTHOR
colordiff is written and maintained by Dave Ewart <davee@sungate.co.uk>. This manual page and the source XML was written by Graham Wilson
<graham@mknod.org> for Debian and is maintained by the author. Dave Ewart maintains the Debian package.
01/25/2009 COLORDIFF(1)