Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
c9dd778e
Commit
c9dd778e
authored
Dec 03, 2013
by
Robby Russell
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1201 from koraa/pull_req_debian
Fix Debian Plugin Auto Completion
parents
5a32796f
1b36c1be
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
1 deletion
+34
-1
debian.plugin.zsh
plugins/debian/debian.plugin.zsh
+34
-1
No files found.
plugins/debian/debian.plugin.zsh
View file @
c9dd778e
# Authors:
# https://github.com/AlexBio
# https://github.com/dbb
# https://github.com/Mappleconfusers
#
# Debian-related zsh aliases and functions for zsh
...
...
@@ -56,7 +57,7 @@ if [[ $use_sudo -eq 1 ]]; then
alias
ar
=
'sudo $apt_pref remove'
# apt-get only
alias
ads
=
'sudo
$apt_pref
dselect-upgrade'
alias
ads
=
'sudo
apt-get
dselect-upgrade'
# Install all .deb files in the current directory.
# Warning: you will need to put the glob in single quotes if you use:
...
...
@@ -109,6 +110,38 @@ else
?not(~n`uname -r`))'
\'
' root'
fi
# Completion ################################################################
#
# Registers a compdef for $1 that calls $apt_pref with the commands $2
# To do that it creates a new completion function called _apt_pref_$2
#
apt_pref_compdef
()
{
local
f fb
f
=
"_apt_pref_
${
2
}
"
eval
"function
${
f
}
() {
shift words;
service=
\"\$
apt_pref
\"
;
words=(
\"\$
apt_pref
\"
'
$2
'
\$
words);
((CURRENT++))
test
\"\$
{apt_pref}
\"
= 'aptitude' && _aptitude || _apt
}"
compdef
"
$f
"
"
$1
"
}
apt_pref_compdef aac
"autoclean"
apt_pref_compdef abd
"build-dep"
apt_pref_compdef ac
"clean"
apt_pref_compdef ad
"update"
apt_pref_compdef afu
"update"
apt_pref_compdef ag
"upgrade"
apt_pref_compdef ai
"install"
apt_pref_compdef ail
"install"
apt_pref_compdef ap
"purge"
apt_pref_compdef ar
"remove"
apt_pref_compdef ads
"dselect-upgrade"
# Misc. #####################################################################
# print all installed packages
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment