I made the mistake of putting an ampersand (&) in a directory name. I renamed the directory, but now every time I change directory it prints an error message:
complete: Completion '[A list of directories' path]' contained a syntax error. Expected an argument, but found a '&'
I don't know where those path completions are stored. I looked into the folders listed in the $fish_complete_path list without luck...
This problem should be easy to fix, only I don't know where to look...
The behavior you're seeing is because there is an eval somewhere that is evaluating a string that wasn't properly escaped. In this case it would be the __fish_complete_cd function. Which, in fish 2.2.0, did in fact use eval in an unsafe fashion. As of fish 2.3.0 it no longer does so which means you can safely use an ampersand in a directory name.
Normally I would recommend opening a bug report at https://github.com/fish-shell/fish-shell/issues with as much detail as possible including the version of fish you're running (echo $FISH_VERSION) and steps to reproduce the issue. However, in this case we've already fixed the bug so all you need to do is upgrade your fish installation. Until you can do so you should be able to "fix" the immediate problem by simply starting a new shell: exec fish.
I also had fisherman installed. I uninstalled OMF, deleted fisherman files and plugins(I had z and get installed). Now it works. Not sure exactly which of those was the culprit.
Related
I am running into an error when I try to run a search and replace in Emacs using Evil-mode. The search I'm using is :s/14/12/g. I've tried without the g and get the same error. This is exactly the same search I'd do in Vim. The error returned indicates I have the wrong number of arguments.
byte-code: Wrong number of arguments: #[(string) "Æ{{A WHOLE BUNCH OF \211's and
such HERE}}" [flags replacement pattern string evil-ex-substitute-replacement args
nil string-match "^[a-zA-Z]" "[^[:space:]]+" ...] 6
("c:/Users/Ryan/Documents/GitHub/Vim/.emacs.d/elpa/evil-1.0.7/evil-search.elc" .
33836)], 2
Am I just searching wrong with Evil?
I had this exact error after running a package upgrade, which included evil.
I believe the root cause however was that I had an old reference to a manually installed evil folder in my init.el loadpath.
I removed that, quit & restarted emacs, and the problem had resolved itself. If you don't have the same init.el problem, perhaps just try removing and reinstalling evil.
I have come across this error today as well. It seems like there is something wrong with the compiled lisp files (.elc). Try to recompile your evil directory with (byte-recompile-directory "c:/Users/Ryan/Documents/GitHub/Vim/.emacs.d/elpa/evil-1.0.7" 0 t). Or, if you like, simply delete all *.elc files.
I want to read data from GtkListStore and build an excel by phpExcel. First, I build a php file according to the GtkListStore, then I use php and phpexcel lib to compile and build execl file.
In my gtk code (compile in MinGW environment), I use execvp(cmd[0], (const char **)cmd); to call the external command -- php. In fact, cmd[0] is php.exe and cmd[1], cmd[2] ... are the parameters for php. After calling the php command, my gtk main window is closed and it quits my gtk program.
How can I prevent the php command from quitting main program? Should I use something else instead of execvp? Thank you.
execvp() and friends replace the current process with another process, so it's no surprise that your program quits. Use g_spawn_sync() or a related function - that will run your php program, then return control to your original program.
Let me answer my own question. Followed is the summary to what I have googled and tried within the past few days. It has nothing new but maybe is useful to a newbie like me.
First, thank ptomato. To avoid my problem in GTK, it must use g_spawn_sync or related functions. If your command is absolute path, you don't have to use the flag G_SPAWN_SEARCH_PATH, otherwise, make sure to use the flag.
Following are something related in MinGW environment.
-> gspawn-win32-helper.exe
In MinGW, to use g_spawn_sync, it must have gspawn-win32-helper.exe installed. When I installed GTK environment, I only extracted the useful lib or exe file I think it is useful then I missed gspawn-win32-helper.exe and it resulted in the problem -- Failed to execute helper program (No such file or directory) mentioned in the above comments. After extracting gspawn-win32-helper.exe from ftp://ftp.gtk.org/pub/glib/2.10/win32/glib-2.10.0.zip and installing it, g_spawn_sync worked.
-> For canonical Windows paths, both double backslashes and single forward slash work, e.g., c:/foo/bar and c:\foo\bar work.
I have this rakefile that works fine when called from a "Start Command Prompt with Ruby" instance, but fails when called with rake.bat. This means I can't get it to work on Jenkins at all using the Rake build step plugin.
From what I can tell, it's the rake/clean task that's messing up and deleting all files in a "/Core" directory. I've explicitly excluded this from the CLEAN filelist, but when called from rake.bat, this is completely ignored.
What could possibly be the cause for this?
Edit:
OK, more info. CLEAN.exclude('**/core') is ignored the first time it's run in the Ruby shell too, but subsequent runs are fine. That explains why rake.bat is a problem 100% of the time.
I'm using rake 0.8.7, but the same thing happens with 0.9.2. Ruby version is 1.9.2p290. albacore version is 0.2.7. Windows 7 x64 (same thing happens on Windows Server 2008 R2 Standard)
OK, I solved it.
Should've realised it earlier, but it's mind-boggingly weird.
fails the first time: CLEAN.exclude("**/core", "**/bak", "**/~") # a comment here
this always works: CLEAN.exclude("**/core", "**/bak", "**/~")
I guess I'm henceforth removing all comments that are not on a single line in my rakefiles...
If i run the following command from a DOS prompt:
hg parents --template {latesttag}
then I get the latest tag value returned as expected. However if I run the same command from within a powershell console I get the following error:
hg parents: option -i not recognized
I need the command to run in powershell so I can get it's results as a variable to use. Any idea what I need to do to get the command running?
You should just need to surround the argument to --template in quotes so that Powershell knows it's a string:
hg parents --template '{latesttag}'
Sometimes, however, with the way Powershell parses things you have to make doubly sure that double-quotes survive (such as passing an argument that contains spaces but should be 1 argument instead of many, like paths or a longer template):
hg parents --template '"{latesttag}"'
This answer comes with a huge disclaimer:
There might be better/different ways than this one, harnessing only PowerShell code, but I'm no PowerShell expert
I am the author of the following class library
I have made a .NET class library, Mercurial.Net that allows a .NET program to wrap around the hg command line client without having to deal with all the intricacies of doing all of that, waiting for the program to complete, etc. Note: You will need Mercurial installed, and available through the PATH for the class library to work.
It can be installed through Nuget package.
Since I'm no PowerShell expert, I'll show how to do this with C# code and my library.
Considering that the library does not implement all options (yet), sadly the parents command cannot be used by my library, but the log command can, although it will probably have more overhead. You will have to be the judge of whether this is acceptable.
The reason the parents command cannot be used is that I have, for now, decided not to implement support for the templating syntax in Mercurial, because then I know what kind of output to expect and can parse that back into proper .NET instances.
Here's the .NET code that would find the tipmost tag:
var repo = new Repository(".");
var tags = repo.Log(new LogCommand().WithRevision("tag()")).First().Tags.ToArray();
This will populate tags with an array of tag-names. The log command returns the log in reverse order, newest changesets first, so .First() will find the newest changeset.
If you need the closest tag that is also an ancestor of the current working folder, here's the changed code:
repo.Log(new LogCommand().WithRevision("tag() and ancestors(.)")).First().Tags...
^---------------^
This includes the revision of the working folder if that has a tag. If you need the ancestor, not including the revision of the working folder:
repo.Log(new LogCommand().WithRevision("tag() and ancestors(.) and not .")).First().Tags...
^--------^
I've installed Aptana 1.5 today but after the install all my SVN projects give me an error like this when I try to commit, update, repair, etc:
Access is denied.
svn: Error resolving case of 'C:\Users\Brayn\My Documents\Aptana Studio Workspace\PentruConstrucii'
I've uninstalled my previous version of aptana, reinstalled aptana 1.5, changed my workspace and it still gives me this error.
Do you know what could it be ?
I've had this exact same error display if I end a directory name with a \ from a cmd.exe shell:
C:\> svn co http://my/repo/ "C:\Work\My Repo\"
svn: Error resolving case of 'C:\Work\My Repo"'
C:\> svn co http://my/repo/ "C:\Work\My Repo"
U C:\Work\My Repo
Checked out revision 13768.
I think it ends up interpreting the final \" as an escaped double-quote instead of a backslash and the end of the string.
"C:\Users" means Windows Vista or 7...
It may be related the way SVN handle Windows Vista symbolic link ("junction"): poorly, according to this ticket (also described in bug 3208):
This bug is reproducible 100% of the time.
1) If you invoke "svn delete" against a Windows Vista symbolic-link, such as
"c:\documents and settings\<username>\my documents\<some path>" then Subversion
will fail with "svn: Error resolving case of 'C:\Documents and
Settings\<username>\my documents\<some path>"'"
2) If you set the current working directory to "c:\documents and
settings\<username>\my documents\<some path>" and invoke "svn delete" against
the local filename the operation succeeds flawlessly.
It may be related to some ACL rights preventing the SVN to access the data:
Subversion tries (via APR) to resolve the exact case of all paths passed to it. This fails because this specific example has a path that is unreadable in its path.
You can see this via:
C:\>cacls "c:\Documents and Settings"
C:\Documents and Settings
Everyone:(DENY)(special access:) FILE_READ_DATA
I know you are referencing C:\Users here, but may be SVN try internally the old path.
Old question, but I had a related and similar problem with a solution that appears relevant to this:
My (unrelated electronic design automation) program was throwing svn: Error resolving case of "<blah blah> errors followed by what looked like my commit log message. I eventually figured out that some double quotes (") I was using for the log message was being interpreted as terminating the message, then the rest of my babbling was taken as input to svn. My solution was to just use single quotes instead.
For your case, it sounds like it could be your program (Aptana) could be screwing up because when it sees spaces in the path name, it encloses the path in quotes, possibly breaking something (redundant quotes?). It would be resolved when you just work in the root C:\ because there are no spaces in the WC root path ...\My Documents\....
I had similar issue today. But in my case, I was using backward slash in path instead of forward slash. I got it working After correcting that.
Its also recommended that path to be given inside double quotes.