alias

Creating a 'git log' alias with formatting

两盒软妹~` 提交于 2019-12-08 01:32:44
问题 I have a bunch of git aliases already set up in my .bash_profile that work correctly: alias gst="git status" alias gl="git pull" alias gp="git push" alias gd="git diff | mate" alias gc="git commit -v" alias gca="git commit -v -a" alias gb="git branch" alias gba="git branch -a" I'm trying to add an alias for the following command, but keep running into an error: git log --all --pretty=format:'%h %cd %s (%an)' --since='7 days ago' What I'd like to do, is be able to type: glog 'some amount of

PowerShell alias syntax for running a cmd.exe builtin function?

百般思念 提交于 2019-12-07 23:59:38
问题 As I have only recently switched to PowerShell from cmd.exe , I often find it convenient to do little things in a familiar way by calling cmd to do them. For instance, to do a 'bare' file listing this works great: PS> cmd /c dir /b dir1 dir2 file1.txt I'd like to make an alias for this but I can't figure out the right syntax. So far I've tried: PS> Set-Alias dirb cmd /c dir /b # error (alias not created) PS> Set-Alias dirb "cmd /c dir /b" # fail (alias doesn't work) PS> Set-Alias dirb "cmd `"

Reuse Subquery from Select Expression in WHERE-Clause

馋奶兔 提交于 2019-12-07 16:32:59
问题 Of course it isn't possible to write SELECT (some subselect) AS blah FROM t WHERE blah = 'const' What is the best way to do this? SELECT (some subselect) FROM t WHERE (some subselect) = 'const' ? View? Stored Function? HAVING? other? 回答1: you can move (some subselect) as table in the FROM : SELECT s.blah FROM t, (some subselect) s WHERE t.id = s.id AND s.blah = 'const' 来源: https://stackoverflow.com/questions/5720983/reuse-subquery-from-select-expression-in-where-clause

What are 'aliased' stream buffers?

佐手、 提交于 2019-12-07 15:37:23
问题 What are 'aliased stream buffers`? I encountered the term in a comment on an answer of mine. 回答1: I've never heard the term before, but in the thread you cite, the person who used it also gave an example: two streams which use the same streambuf. Of course, just because two streams don't use the same streambuf, doesn't mean that data written to them doesn't ultimately end up in the same place; that they don't alias the same sink, if that is what is meant. There are filtering streambuf's,

Cmder : how to use an alias in another alias?

守給你的承諾、 提交于 2019-12-07 12:03:48
问题 I would use an alias in another alias in Cmder. I'm having a nice alias (the first) to a big command, and I would use it inside another one (the second) : mergelocdist=git fetch origin --prune --verbose && git checkout $1 && git merge --ff-only --verbose origin/$2 || git rebase --preserve-merges --verbose origin/$2 mm=mergelocdist master master The aliases are in the Cmder aliases file, and I'm on Windows 7 x64. The topic has already been asked in this question,with no replies as now. If you

CSS inheritance, aliases and other cool stuff

本小妞迷上赌 提交于 2019-12-07 10:58:20
问题 The other day I was randomly browsing the web and I found some program that lets you write CSS aliases and other cool stuff (which I can't remember right now). As an example, I remember you can do something like this: .myclass { background-color: red; greenfont } where greenfont was defined somewhere else as somekind of alias greenfont { color: green; } Then the program will generate the resulting CSS based on the alias and other stuff. Does anyone has used this? Or did I dreamed about it? I

“Invalid column name”, Order By on Alias of subquery

一个人想着一个人 提交于 2019-12-07 10:20:18
问题 I've created a stored procedure where i want to add an alternative order by clause. The problen is that the query failed on a "Invalid column name 'aantal regels'" Here is the query I have now. SELECT l.lead_id, l.afdeling_id, l.advertentie_id, l.naam, l.type, l.status, l.herkomst, l.aanmaakdatum, l.klant_id, l.overigegegevens, af.afdelingsnaam, (SELECT COUNT(lead_regel_id) FROM Lead_regel As lr Where Lr.lead_id = l.lead_id And lr.status <> 100 ) AS aantal_regels, (SELECT COUNT(lead_id) FROM

gnome-terminal new tab with alias as command to execute

末鹿安然 提交于 2019-12-07 08:10:53
问题 I've created an alias in .bashrc file as follows alias myproject = 'cd ~/Desktop/myproject' After saving the file when I restart my terminal, typing in myproject takes me to the project directory but when I try to use the alias as a command argument to a new gnome-terminal tab it throws an error, gnome-terminal --tab -e "myproject" throws the error There was an error creating the child process for this terminal Failed to execute child process "myproject" (No such file or directory) What is

SQLite update query - subquery with aliases doesn't work

喜夏-厌秋 提交于 2019-12-07 06:47:47
问题 I need to update a SQLite table. The table looks like: ID | Address | CallNumber | RefID -----+--------------------+------------------------------------------- ef78 | library | 2002/13 | 100002 no56 | Lit | 0189 | 100003 rs90 | temp | | 100003 For every column with Address = "Lit" there is a column Address = 'temp' with the same RefID. Now I need to update each Address = "temp" with the value "CallNumber" from the column with the same RefID. The updated table should look like: ID | Address |

minimal typing command line calculator - tcsh vs bash

自闭症网瘾萝莉.ら 提交于 2019-12-07 06:40:02
问题 I like to have a command-line calculator handy. The requirements are: Support all the basic arithmetic operators: +, -, /, *, ^ for exponentiation, plus parentheses for grouping. Require minimal typing, I don't want to have to call a program interact with it then asking it to exit. Ideally only one character and a space in addition to the expression itself should be entered into the command line. It should know how to ignore commas and dollar (or other currency symbols) in numbers to allow me