mirror of
https://github.com/cmderdev/cmder.git
synced 2025-06-15 06:07:50 +08:00
Merge branch 'master' into alias
This commit is contained in:
34
vendor/bin/alias.cmd
vendored
34
vendor/bin/alias.cmd
vendored
@ -117,26 +117,36 @@ exit /b
|
||||
:p_help
|
||||
echo.Usage:
|
||||
echo.
|
||||
echo. alias [options] [alias=alias command] or [[create [alias] [alias command]]]
|
||||
echo. alias [options] [alias=alias command]
|
||||
echo.
|
||||
echo OR
|
||||
echo.
|
||||
echo. alias create [alias] [alias command]
|
||||
echo.
|
||||
echo.Options:
|
||||
echo.
|
||||
echo. Note: Options MUST precede the alias definition.
|
||||
echo. Note: Options MUST precede the alias definition.
|
||||
echo.
|
||||
echo. /d [alias] Delete an [alias].
|
||||
echo. /f [macrofile] Path to the [macrofile] you want to store the new alias in.
|
||||
echo. Default: %cmder_root%\config\user_aliases.cmd
|
||||
echo. /reload Reload the aliases file. Can be used with /f argument.
|
||||
echo. Default: %cmder_root%\config\user_aliases.cmd
|
||||
echo. /d [alias] Delete an [alias].
|
||||
echo. /f [macrofile] Path to the [macrofile] you want to store the new alias in.
|
||||
echo. Default: %cmder_root%\config\user_aliases.cmd
|
||||
echo. /reload Reload the aliases file. Can be used with /f argument.
|
||||
echo. Default: %cmder_root%\config\user_aliases.cmd
|
||||
echo.
|
||||
echo. If alias is called with no parameters, it will display the list of existing aliases.
|
||||
echo. If alias is called with no parameters, it will display the list of existing
|
||||
echo. aliases.
|
||||
echo.
|
||||
echo. In the alias command, you can use the following notations:
|
||||
echo.
|
||||
echo. ^^^^^^^^%% - '%%' in env vars must be escaped if preserving the variable in the alias is desired.
|
||||
echo. $* - allows the alias to assume all the parameters of the supplied command.
|
||||
echo. $1-$9 - Allows you to seperate parameter by number, much like %%1 in batch.
|
||||
echo. $T - Command seperator, allowing you to string several commands together into one alias.
|
||||
echo. ^^^^^^^^%% - %% signs in env vars must be escaped if preserving the variable
|
||||
echo. in he alias is desired. Variables in aliases surrounded by double
|
||||
echo. quotes only require '^^%%' vs '^^^^^^^^%%'
|
||||
echo. $* - allows the alias to assume all the parameters of the supplied
|
||||
echo. command.
|
||||
echo. $1-$9 - Allows you to seperate parameter by number, much like %%1 in
|
||||
echo. batch.
|
||||
echo. $T - Command seperator, allowing you to string several commands
|
||||
echo. together into one alias.
|
||||
echo.
|
||||
echo. For more information, read DOSKEY /?
|
||||
exit /b
|
||||
|
10
vendor/clink.lua
vendored
10
vendor/clink.lua
vendored
@ -189,12 +189,15 @@ end
|
||||
-- @return {false|mercurial branch name}
|
||||
---
|
||||
local function get_hg_branch()
|
||||
for line in io.popen("hg branch 2>nul"):lines() do
|
||||
local file = io.popen("hg branch 2>nul")
|
||||
for line in file:lines() do
|
||||
local m = line:match("(.+)$")
|
||||
if m then
|
||||
file:close()
|
||||
return m
|
||||
end
|
||||
end
|
||||
file:close()
|
||||
|
||||
return false
|
||||
end
|
||||
@ -204,12 +207,15 @@ end
|
||||
-- @return {false|svn branch name}
|
||||
---
|
||||
local function get_svn_branch(svn_dir)
|
||||
for line in io.popen("svn info 2>nul"):lines() do
|
||||
local file = io.popen("svn info 2>nul")
|
||||
for line in file:lines() do
|
||||
local m = line:match("^Relative URL:")
|
||||
if m then
|
||||
file:close()
|
||||
return line:sub(line:find("/")+1,line:len())
|
||||
end
|
||||
end
|
||||
file:close()
|
||||
|
||||
return false
|
||||
end
|
||||
|
2
vendor/clink_settings.default
vendored
2
vendor/clink_settings.default
vendored
@ -87,7 +87,7 @@ history_io = 1
|
||||
# from the history. This can be enabled and disable by setting this value to 1
|
||||
# or 0. Values or 2, 3 or 4 will skip any ! character quoted in single, double,
|
||||
# or both quotes respectively.
|
||||
history_expand_mode = 4
|
||||
history_expand_mode = 3
|
||||
|
||||
# name: Support Windows' Ctrl-Alt substitute for AltGr
|
||||
# type: bool
|
||||
|
4
vendor/init.bat
vendored
4
vendor/init.bat
vendored
@ -369,9 +369,9 @@ call "%user_aliases%"
|
||||
:: Basically we need to execute this post-install.bat because we are
|
||||
:: manually extracting the archive rather than executing the 7z sfx
|
||||
if exist "%GIT_INSTALL_ROOT%\post-install.bat" (
|
||||
%lib_console% verbose_output "Running Git for Windows one time Post Install...."
|
||||
echo Running Git for Windows one time Post Install....
|
||||
pushd "%GIT_INSTALL_ROOT%\"
|
||||
"%GIT_INSTALL_ROOT%\git-bash.exe" --no-needs-console --hide --no-cd --command=post-install.bat
|
||||
"%GIT_INSTALL_ROOT%\git-cmd.exe" --no-needs-console --no-cd --command=post-install.bat
|
||||
popd
|
||||
)
|
||||
|
||||
|
2
vendor/user_aliases.cmd.default
vendored
2
vendor/user_aliases.cmd.default
vendored
@ -9,7 +9,7 @@ gl=git log --oneline --all --graph --decorate $*
|
||||
ls=ls --show-control-chars -F --color $*
|
||||
pwd=cd
|
||||
clear=cls
|
||||
history=cat "%CMDER_ROOT%\config\.history"
|
||||
history=cat -n "%CMDER_ROOT%\config\.history"
|
||||
unalias=alias /d $1
|
||||
vi=vim $*
|
||||
cmderr=cd /d "%CMDER_ROOT%"
|
||||
|
Reference in New Issue
Block a user