Cygwin - ypcat command equivalent - cygwin

I've been trying to find the equivalent command for the UNIX ypcat utility for Cygwin, but there is almost no documentation for it i regards to its presence (if any) for Cygwin. Can anybody help me find or teach me its equivalent, and if they can a brief explanation on how to use it if it differs from ypcat (it happened to me that Cygwin uses aspell for spell checking, replacing ispell or spell, and does not use the same entry format). TIA!

Someone made a port, but the files are no longer available at the specified domain, it seems.
http://www.cygwin.com/ml/cygwin-apps/2003-09/msg00144.html
You may have to contact the owner by e-mail to get a copy.

Related

Don't understand 'complete-items' in the vim help files

I am looking at the vim help files and looking for a variable on the linux version that is like v:completed_item from cygwin. v:completed_item is a:
Dictionary containing the complete-items for the most recently completed word after CompleteDone.  The Dictionary is empty if the completion failed.
I am looking for the same thing for Linux but I cannot find it and the closes thing I can find in the ins-completion help file is complete-item but nothing on how to use it anyone know how to use it? And if it will be the same as the completed_item from the cygwin version?
Thanks
The presence of a feature doesn't depend on the platform, it depends on the build type, version number, and patch-level.
If you want feature parity between two environments, you rather obviously must install the same build type and version number (including patches) on both environments.
FYI, that variable was added in patch 7.4.774.

Easier navigation through filesystem in linux shell (cli)

I often find myself taking a lot of time to navigate through my filesystem when using the linux shell. This generally occurs because the autocompletion of bash only works if you provide the start of the file/dirname. What I often end up in is a lot of 'ls' with 'grep' commands, finally doing a 'cd'.
When you use a GUI based filebrowser (like Nautilus) you can type any part of a file/dirname and it will have matches that it jumps to directly. This makes it a lot easier and faster to navigate.
I wonder if anybody knows any great tools that helps with this problem. I know of the existence of Midnight Commander, though I never really used it for real and I couldn't figure out a direct solution for my problem the first couple of times I tried it. Also it seems not suitable because I want to have my shell's current working directory to be changed so I can do stuff there, instead of being stuck in an external program like Midnight Commander.
Try autojmp
https://github.com/joelthelion/autojump
And following article provides another solution
http://jeroenjanssens.com/2013/08/16/quickly-navigate-your-filesystem-from-the-command-line.html
You can first use the autocd or autopushd in zsh. You would just have to type the directory you want to go to, without the hassle of typing cd or pushd everytime.
You also have the globing possibility. For example, if I got those file in a directory:
1-a.tar
1-b.tar
c.tar
I can just type
*a.tar
without caring about the beginning of the file.
As a last solution you can always use an alias to the find command with a personalized option.

Narrator for Cygwin

Does anyone know if there is a reader (text-to-speech) tool for cygwin or linux? I know of Microsoft's narrator, which partially works by sounding out what I type in the cygwin window (bash command line) but it doesn't report anything written to stdout.
Is there a native Cygwin tool anyone knows of?
BRLTTY, which is available through Cygwin's setup.exe, apparently does have some speech support in addition to being able to drive Braille displays. I've got no experience with it though.
BRLTTY seems to be just an interface for Braile displays - I couldn't make it "talk".
Instead get festival binary from bottom of here, put it in C:/festival, and in cygwin
echo "hello world" | /cygdrive/c/festival/bin/festival.exe --tts
should say hello world. Then I put it into a script say.sh and calling
~/say.sh hi
actually does what you'd expect :)

Getting gvim to automatically translate a cygwin path

I love cygwin and the native windows version of gvim and I use them together all the time. The only problem I have is with cygwin path names. Gvim for windows doesn't understand them so I have to resort to typing things like:
gvim `cygpath -wa ~/scripts/myscript.pl`
Which is annoying!
I was wondering if there's a neat way of using autocmds to detect if a cygwin path has been provided and, if so, convert it to a windows path on the FileReadPre event. Does anyone know if/how this can be acomplished?
There exist several solutions (see vim.wikia.com, cygwin category).
I'm maintaining the more flexible one: cyg-wrapper.sh (flexible in the sense it knows that (vim) flags are not pathnames, and it can even be told that "binary" flags like -c expect another argument that is not a pathname, and in the sense that it is not vim specific)
Regarding the invocation of cygwin executables from win32-vim, you won't have any troubles ... as long as the executable won't return pathnames expressed in *nix format.
For all compilation related executables (gcc/make/doxygen/...) I also have a solution. In the past it was a simple standalone perl script (still available on vim.org). Now I have a full solution that does other compilation related stuff: BuildToolsWrapper (that requires lh-vim-lib on the same site)
Regarding things like :e /etc/hosts, I have no solutions. A long time ago, I've tried to play with FileReadPre & co, but I gave up along the way, and I don't remember why ^^'.

How can I hook into tcsh's TAB completion on Linux

I have some directories with a number of "hidden" files. One example of this is I'm in a source controlled sandbox and some of the files have not been checked out yet.
When I hit TAB, I'd like the option of seeing these files.
A similar question has been asked before: CVS Tab completion for modules under linux
The answers to that question summarize to: "Ubuntu's got that built in".
I don't have the option of switching to Ubuntu, but surely I can use the same mechanisms.
how can I hook into the TAB-completion feature of tcsh to add additional file Support for CVS, SVN and BitKeeper would all be useful.
More important than support for a specific source control system is the ability to control the returned list myself.
An acceptable solution would also be to use a key-binding other than TAB. (ctrl- perhaps)
From the manpage:
the complete builtin command can be used to tell the shell how to complete words other than filenames, commands and variables
might get you started
I do not know how to program in tcsh. But if you can, then you could look at the file named "bash_completion" from the archive (find the download link here.)
On line 1673 begins CVS completion code - and this might be portable to csh if you are familiar with the differences between bash/tcsh.
On my ubuntu machine, there is also a section for SVN completion (in /etc/bash_completion) that doesn't seem to be present in the maintainer's archive.
That's not Ubuntu-specific behavior, it's the bash-completion project.
You could use that, if you can switch from tcsh to bash.

Resources