当前位置: 首页 > news >正文

怎样注册公司网站建立网页wordpress导航添加登录退出

怎样注册公司网站建立网页,wordpress导航添加登录退出,wordpress主题 含演示数据,全媒体运营师实时在 Linhieng/current–Microsoft.PowerShell_profile.ps1 上更新 打开 $Profile 文件#xff0c;将下面内容粘贴到其中即可#xff1a; # 负责打印 git 分支相关信息支持输出以下信息#xff1a;当前分支#xff0c;或者是 hash 值当前目录是否为 git 子目录当前…实时在 Linhieng/current–Microsoft.PowerShell_profile.ps1 上更新 打开 $Profile 文件将下面内容粘贴到其中即可 # 负责打印 git 分支相关信息支持输出以下信息当前分支或者是 hash 值当前目录是否为 git 子目录当前是否有提交历史 # function write_host_git_branch {# 在这里能确保是一个 git 仓库或者是一个 git 仓库中的子目录# 获取当前 HEAD 所在分支名。如果当前是 detached HEAD 状态则显示为 hash。$git_branch git symbolic-ref --short --quiet HEADWrite-Host ( -ForegroundColor DarkGray -NoNewlineif ( $null -eq $git_branch ) {$hash git rev-parse --short HEADWrite-Host $hash -ForegroundColor red -NoNewline} else {Write-Host $git_branch -ForegroundColor blue -NoNewline}Write-Host ) -ForegroundColor DarkGray -NoNewlineif (# 如果当前目录没有 .git 文件夹说明当前是在 git 仓库的子目录$false -eq (Test-Path .git)) {Write-Host sub -ForegroundColor DarkGray -NoNewline}$git_log git log 21if (# 命令执行失败$? -eq $false) {write_host_not_commits($git_log)}$tags git tag --points-at HEADif ($null -ne $tags) {$tags_one_line ($tags -split \r?\n) -join , Write-Host [ -ForegroundColor DarkGray -NoNewlineWrite-Host $tags_one_line -ForegroundColor DarkYellow -NoNewlineWrite-Host ] -ForegroundColor DarkGray -NoNewline}# 打印子模块相关信息会有性能问题# $submodule git submodule status 21 }function write_host_not_commits($git_log) {$error_message ($git_log.Exception.Message | Select-Object -First 1).Trim()if ($true -eq $error_message.EndsWith(does not have any commits yet)) {Write-Host not commits yet -ForegroundColor red -NoNewline} else {Write-Host ❌fatal: $error_message -ForegroundColor red -NoNewline}return }function wirte_host_git_wrong($git_output) {# 转换为字符串对象并只获取第一行的内容$error_message ($git_output.Exception.Message | Select-Object -First 1).Trim()# 检查输出是否以指定的前缀开头if (# 空非 git 仓库$true -eq $error_message.StartsWith(fatal: not a git repository)) {Write-Host -NoNewline} elseif (# 不安全的仓库$true -eq $error_message.StartsWith(fatal: detected dubious ownership)) {Write-Host ❌fatal: detected dubious ownership -ForegroundColor red -NoNewline} else {Write-Host ❌fatal: $error_message -ForegroundColor red -NoNewline} }function write_host_git_info {# 执行 Git 命令并捕获输出。 21 表示将 stderr 重定向到 stdout, 以将错误信息保存在 $git_output 变量中$git_output git rev-parse --is-inside-work-tree 21if (# 前一个命令执行失败$? -eq $false) {wirte_host_git_wrong($git_output)return}write_host_git_branch }# 判断当前是否是管理员 function has_admin_power {$identity [Security.Principal.WindowsIdentity]::GetCurrent()$principal [Security.Principal.WindowsPrincipal] $identity$adminRole [Security.Principal.WindowsBuiltInRole]::Administratorreturn $principal.IsInRole($adminRole) }function __prompt {# 空格原则输出内容时不需要考虑给前面留空只需要考虑给后面留空$pwsh_version PS$($Host.version.Major) $fullpath $($executionContext.SessionState.Path.CurrentLocation)Write-Host n$pwsh_version -NoNewlineWrite-Host $fullpath -NoNewline -ForegroundColor greenwrite_host_git_infoif (has_admin_power) {return n# } else {return n$ }}# 主入口 function prompt {# 编写的代码可能报错try {__promptreturn} catch {# 输出报错信息Write-Host powershell script error occurred: $_ -NoNewline -ForegroundColor red}return nPS }# 解决终端的中文乱码问题。注意chcp 无效 $OutputEncoding [console]::InputEncoding [console]::OutputEncoding New-Object System.Text.UTF8Encoding # 设置 UpArrow 快捷方式为向前搜索 Set-PSReadLineKeyHandler -Key UpArrow -ScriptBlock {[Microsoft.PowerShell.PSConsoleReadLine]::HistorySearchBackward()[Microsoft.PowerShell.PSConsoleReadLine]::EndOfLine() } # 设置向上键为后向搜索历史记录 # 设置 DownArrow 快捷方式为向后搜索 Set-PSReadLineKeyHandler -Key DownArrow -ScriptBlock {[Microsoft.PowerShell.PSConsoleReadLine]::HistorySearchForward()[Microsoft.PowerShell.PSConsoleReadLine]::EndOfLine() }
http://www.pierceye.com/news/589449/

相关文章:

  • 厦门市建设局思明建设分局官方网站在谷歌上做外贸网站有用吗
  • 网站开发手机自适应直接在原备案号下增加新网站
  • 公司网站建设安全的风险网络工程师app
  • 网站app封装怎么做电商网页
  • 网站文章做排名wordpress菜单文本
  • 建站哪家好社区个人网站模板 免费
  • 东西湖区建设局网站如何生成网址链接
  • wordpress商城视频教程苏州推广关键词优化
  • 网站游戏正规网站建设安卓系统软件开发培训机构
  • 关于网站集约化建设的讲话周口seo公司
  • 长沙做网站的公司哪家最好服务公司取名
  • 网站缩略图制作宁波商城网站建设
  • 公司网站公众号维护怎么做湖南网站建设
  • 商务网站建设实训结论装饰装修工程
  • dw做网站简单吗网络科技建设网站
  • 天台建设局网站wordpress编辑器没有16px
  • 携程网站建设计划管理与进度控制志鸿优化设计电子版
  • 网站一级域名和二级域名wordpress 插件 页面
  • 怎么做免费网站如何让百度收录网网站建设设计
  • 河北建设工程信息网官方网站证件在线制作免费
  • 推广网官方推广网站wordpress用户角色权限
  • 电子商务网站模板html淘宝网页版登录
  • 忆达城市建设游戏网站佛山市和城乡建设局网站
  • 备案后的域名改网站名青浦建设机械网站
  • 网站地图怎么做html网络营销论文2000字
  • 武进区城乡建设局网站组建网站建设团队
  • 做淘宝链接模板网站广安网站建设兼职
  • 受欢迎的网站建设平台有用的网站地址
  • 网站建设推广岗位网站建设法规
  • ftp两个网站子域名的绑定郑州网站推广公司