I am trying to do a git pull --rebase from magit following these steps:
C-x g (bound to magit-status)
F (opens the submenu for pulling)
The menu tells me that I can use the -r switch to do a rebase, so I do:
C-u -r
But the above doesn't seem to work. Any ideas how I can provide the --rebase flag ?
Thanks,
Murtaza
As #abo-abo's comment suggests, you do not need to press C-u to activate the -r switch (or any other switch in any submenu, for that matter). The correct sequence of steps is:
C-x g F -r F
I think what might have tripped you up is the fact that magit calls switches (such as -r) "prefixes" in the message that appears in the echo area when bringing up a submenu:
Type a prefix key to toggle it. Run 'actions' with their prefixes. '?' for more help.
Related
So I've aliased the commands rm/cp/mv to use interactive (-i) mode by default to avoid accidentally deleting things, but sometimes this is pretty inconvenient.
I would like to be able to say 'y' to all the prompts of the form:
mv: overwrite `file_1'? y
mv: overwrite `file_2'? y
without typing 'y' many many times. Is there a way to do this?
Use command mv to circumvent the alias and use --force if that doesn't stop mv from bothering you with questions (e.g., because of permissions).
yes | aCommand is the standard way to supply lots of y's to aCommand, but in this case that seems unnecessary.
you can use back slash before cp
\cp -rf /from/directory/* to/directory
I'm quite sure is something dealing with my Oh-my-zsh configuration, but I can't figure out what it is.
When I use a "#" symbol in my git command (but on everything else too, like 'ls #2' for instance) I get 'bad pattern' error or 'no match found'
I guess is about counting something, but I can't find where to configure it.
I.E.
➜ demo git:(adlist) git push origin adlist#3
zsh: no matches found: adlist#3
or
➜ demo git:(adlist) git push origin #3-adlist
zsh: bad pattern: #3-adlist
Use single quotes:
git push origin 'adlist#3'
git push origin #3-adlist
In zsh # is used for pattern removal. See: http://zsh.sourceforge.net/Guide/zshguide05.html under the heading Standard forms: pattern removal
You can unsetopt EXTENDED_GLOB, and this should stop # being interpreted as a part of a pattern.
If you really want to keep most of the features of EXTENDED_GLOB, but want to disable # being used for patterns, then you can disable -p '#' (you have to single quote the # argument, so that it doesn't get expanded like a pattern). This certainly works in my zsh installation, version 5.7.1, even though it is not documented in zshbuiltins(1).
Open your zshrc file:
vi ~/.zshrc
Add into end of file:
unsetopt INTERACTIVE_COMMENTS
unsetopt BAD_PATTERN
Effect your file:
source ~/.zshrc
Restart your terminal and enjoy it.
When i type "-R 777" I get:
file-modes-symbolic-to-number: Parse error in modes near `R 777'.
Recursive operations aren't supported by dired-do-chmod.
It's easy to do this as a shell command, though:
M-! chmod -R 777 (files) RET
Alternatively, the Dired+ library provides a diredp-do-chmod-recursive command for this, bound to M-+M (and added only a few days ago, apparently, so that was a well-timed question).
How can I search the command history in cygwin?
I don't want to keep pressing the arrow keys to execute a command from console command history.
If you are using the default editing mode, do ctrl+R to search back through your history.
If you have done set -o vi to use vi editing mode, then it is esc-/
The history command is the way to go. I use
h ()
{
history | cut -f 2- | sort -u | grep -P --color=auto -e "$*"
}
so that I can type something like h git.*MyProgram, h ^tar -c, h svn:ignore, etc to pull up a sorted list of past commands matching a regex.
You might also want to add the following lines to ~/.inputrc:
# Ctrl+Up/Down for searching command history
"\e[1;5A": history-search-backward
"\e[1;5B": history-search-forward
With these in place, you can type a partial command prefix (such as gi or sql) then use Ctrl+Up to scroll back through the list of just your command history entries that match that prefix (such as git clone https://code.google.com/p/double-conversion/ and sqlite3 .svn/wc.db .tables). This can be a lot faster than searching and then cutting and pasting if you want to edit or re-execute a command that was fairly recent.
I use the history command in combination with grep, e.g. history | grep vi shows all commands where vi was used.
Checkout the "Gnu Bash Manual" (man bash) for the command "fc". E.g.fc -l -80 would list the last 80 commands, while other options let you search with RegEx...
Do
vi ~/.inputrc
Add
For arrow up/down bindings:
"\e[A": history-search-backward
"\e[B": history-search-forward
Or for page up/down bindings:
"\e[5~": history-search-backward
"\e[6~": history-search-forward
Close and open cygwin.
Voila.
I think one of the easiest way is to pipeline it with less and press search character ("/") and then type the command you wanna find.
history | less
and then
/text to find
to find the desired command
Another way
is to append the stdout form history command to a file: history > /cygdrive/path/file.txt
and then search in the document.
Is there a way to get PCL-CVS to operate on multiple CVS repositories at the same time? Each repository should get its own *cvs* buffer.
A prefix arg bigger than 8 is needed. e.g. C-u C-u M-x cvs-update
I found the answer in the Emacs manual.
cvs-examine is an interactive compiled Lisp function in `pcvs.el'.
Run a 'cvs -n update' in the specified DIRECTORY.
That is, check what needs to be done, but don't change the disc.
Feed the output to a cvs buffer and run `cvs-mode' on it.
With a prefix argument, prompt for a directory and cvs FLAGS to use.
A prefix arg >8 (ex: C-u C-u),
prevents reuse of an existing cvs buffer.
Optional argument NOSHOW if non-nil means not to display the buffer.