alias

How do I include --no-pager in a Git alias?

若如初见. 提交于 2019-12-05 00:45:34
I created a Git alias based off of the Git Immersion tutorial by EdgeCase that looks like this: hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short But now it seems to be paging the results — Terminal shows (END) after the results are displayed, forcing me to hit Q to continue working. I read that by adding in the --no-pager tag, you can disable this feature; how do I incorporate it into the alias? I've tried it at the end, before the log , and right after, and none of them have worked. Git throws an error saying it is an unrecognized argument, or that it changes

gitconfig aliasing using !source doesn't work (zsh)

偶尔善良 提交于 2019-12-05 00:44:50
问题 I have a gitconfig like this: [alias] l = "!source ~/.githelpers && pretty_git_log" When I run it I get this: [desktop] git l source ~/.githelpers && pretty_git_log: 1: source: not found error: cannot run source ~/.githelpers && pretty_git_log: No such file or directory fatal: While expanding alias 'l': 'source ~/.githelpers && pretty_git_log': No such file or directory When I add any other shell builtins to test, they run fine: [alias] l = "!echo running from the builtin" [desktop] git l

Git alias to delete remote branch

∥☆過路亽.° 提交于 2019-12-04 19:43:20
问题 I am trying to make an alias to delete a remote branch but I can't seem to get it, here is my latest attempt that I really expected to work but no luck. rmrb = !git push origin :$1 I also tried, rmrb = branch -r -d but this doesn't do the same thing as git push origin :<branch> . Does anyone know if this is possible or have an existing alias to do this? 回答1: You just have to define it like this: [alias] rmrb = "push --delete origin" And do git rmrb mybranch 回答2: Maybe a shell function would

How I can make alias called when it's called by a variable

笑着哭i 提交于 2019-12-04 17:10:29
I added an alias: $ alias anyalias="echo kallel" If I execute: $ anyalias kallel it executes the echo command without any problem. Now, if I define a variable in this way: $ var="anyalias" and then execute with this way: $ $var -ash: anyalias: not found Then I got a shell error. How I can make $var running the command defined in the anyalias alias? I m not looking to change the way of calling $var . But I m looking for a way of changing the definition of the alias or export it. Instead of alias consider using function: anyfunc() { echo "kallel"; } v=anyfunc $v kallel Safer is to store the call

Using alias in query and using it

≡放荡痞女 提交于 2019-12-04 17:06:51
问题 I have a doubt and question regarding alias in sql. If i want to use the alias in same query can i use it. For eg: Consider Table name xyz with column a and b select (a/b) as temp , temp/5 from xyz Is this possible in some way ? 回答1: You are talking about giving an identifier to an expression in a query and then reusing that identifier in other parts of the query? That is not possible in Microsoft SQL Server which nearly all of my SQL experience is limited to. But you can however do the

change an alias target python

不羁的心 提交于 2019-12-04 16:26:02
I would like to change the target of an alias using python. do I have to download some external library to do this. I played around with aliases a bit and can't figure out any way to edit them without user input. I'm using mac, python 2.6 As far as I can tell it should be possible using PyObjC to get at the Mac's Foundation library. I think NSURLBookmarkResolutionWithoutUI is what you are looking for. PyObjC was a good suggestion. I couldn't find a solution anywhere, but after asking an equivalent question, finally managed to create one. See my answer to my own question: how to read, change,

Create an Alias Directory inside a Virtual Host

最后都变了- 提交于 2019-12-04 15:56:11
问题 I checked here, here, here, here, and here before asking this question. I guess my search skills are weak. I am using the WampServer version 2.2e . I have a need like, I need a virtual path inside a virtual host. Let me say the two hosts that I have. Primary Virtual Host (Localhost) NameVirtualHost *:80 <VirtualHost *:80> ServerName localhost DocumentRoot "C:/Wamp/www" </VirtualHost> My Apps Virtual Hosts <VirtualHost *:80> ServerName apps.ptrl DocumentRoot "C:/Wamp/vhosts/ptrl/apps" ErrorLog

alias in cshell with grave accents, apostrophes and more

独自空忆成欢 提交于 2019-12-04 15:55:42
I came across a weird behavior in the c-shell: when writing the following line, i get exactly the behavior I expect: ls -l | grep $USER | somescript `awk -F' ' '{print $1}'` meaning - it will search all items owned by me and activate 'somescript' with their first field as argument. however, when I try aliasing the same line, it jams my shell (or hands out error massages if i separate the braces from the apostrophe: alias doit 'ls -l | grep $USER | somescript `awk -F' ' '{print $1}'`' will result in either {: Command not found print: Command not found or simply not being able to start a new

creating an alias in ubuntu , in .profile

烈酒焚心 提交于 2019-12-04 15:07:50
I can't figure out why this simple alias isn't work. I've read online an example on creating it and don't know where I'm going wrong... I've added the following to my .profile file at the bottom: alias profile='sudo nano ~/.profile' When I type in 'profile' in the terminal it says command not found... I have a feeling this is a very very simple error I'm making. Thanks everyone! What happens if you log out and back in? Alternatively you could just type source .profile and that should activate your alias. Many people using bash set their aliases up in the .bashrc file. Arvind to add alias

Use SQL keyword as alias name of a column

梦想与她 提交于 2019-12-04 14:51:26
I'm executing the following query but it is giving syntax error. Because the keyword key is registered in SQL SELECT `id` AS key, `country_name` AS value FROM countries I also tried using brackets like this but it's not working: SELECT `id` AS [key], `country_name` AS value FROM countries How to deal with it? Use backtick(`) or Single Quote(') to give alias name of column in MySQL. Try this: SELECT `id` AS 'key', `country_name` AS value FROM countries; OR SELECT `id` AS `key`, `country_name` AS value FROM countries; key is mysql keyword so compiler suppose as mysql keyword, you should warp by