Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
ce41d0e5
Commit
ce41d0e5
authored
Mar 16, 2011
by
Daniel Bolton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add debian plugins file
parent
5bbd87a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
0 deletions
+60
-0
debian.plugin.zsh
plugins/debian/debian.plugin.zsh
+60
-0
No files found.
plugins/debian/debian.plugin.zsh
0 → 100644
View file @
ce41d0e5
# https://github.com/dbbolton/
#
# Debian-related zsh aliases and functions for zsh
# Aliases ###################################################################
# Some self-explanatory aliases
alias
afs
=
'apt-file search --regexp'
alias
aps
=
'aptitude search'
alias
apsrc
=
'apt-get source'
alias
apv
=
'apt-cache policy'
alias
apdg
=
'su -c "aptitude update && aptitude safe-upgrade"'
alias
apud
=
'su -c "aptitude update"'
alias
apug
=
'su -c "aptitude safe-upgrade"'
# print all installed packages
alias
allpkgs
=
'aptitude search -F "%p" --disable-columns ~i'
# Install all .deb files in the current directory.
# Warning: you will need to put the glob in single quotes if you use:
# glob_subst
alias
di
=
'su -c "dpkg -i ./*.deb"'
# Create a basic .deb package
alias
mydeb
=
'time dpkg-buildpackage -rfakeroot -us -uc'
# Remove ALL kernel images and headers EXCEPT the one in use
alias
kclean
=
'su -c '
\'
'aptitude remove -P ?and(~i~nlinux-(ima|hea) ?not(~n`uname -r`))'
\'
' root'
# Functions #################################################################
# create a simple script that can be used to 'duplicate' a system
apt-copy
()
{
print
'#!/bin/sh'
"
\n
"
>
apt-copy.sh
list
=
$(
perl
-m
'AptPkg::Cache'
-e
'$c=AptPkg::Cache->new; for (keys %$c){ push @a, $_ if $c->{$_}->{'
CurrentState
'} eq '
Installed
';} print "$_ " for sort @a;'
)
print
'aptitude install '
"
$list
\n
"
>>
apt-copy.sh
chmod
+x apt-copy.sh
}
# Kernel-package building shortcut
dbb-build
()
{
MAKEFLAGS
=
''
# temporarily unset MAKEFLAGS ( '-j3' will fail )
appendage
=
'-custom'
# this shows up in $ (uname -r )
revision
=
$(
date
+
"%Y%m%d"
)
# this shows up in the .deb file name
make-kpkg clean
time
fakeroot make-kpkg
--append-to-version
"
$appendage
"
--revision
\
"
$revision
"
kernel_image kernel_headers
}
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