-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup.py
More file actions
110 lines (82 loc) · 3.26 KB
/
Copy pathsetup.py
File metadata and controls
110 lines (82 loc) · 3.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
from distutils.core import setup
setup(
url = 'https://github.com/uxcn/sh-utils',
name = 'sh-utils',
version = '0.9',
fullname = 'sh-utils',
description = 'some commands to simplify various things',
long_description = '''
sh-utils
Some commands to simplify various things.
* pm - move p to p'
* cpm - copy p to p'
* upm - undo p to p'
* sw - swap two paths
* pt - pivot file over a command
* pts - pivot file over a command (stdin)
These commands simplify some common tasks in a shell.
For example, it's often helpful to copy a file to a backup.
::
jason@io ~ cp foo foo\\'
Instead, the `cpm` command is a bit more flexible and less to type.
::
jason@io ~ cpm foo
The `pm` commands, in general, can also be used en masse.
::
jason@io ~ cpm *
Another common pattern is running a command on a file and replacing it with the output,
which `pt` supports.
::
jason@io ~ pt sort foo
The `pts` command is also similar to `pt`, but allows for some more complex
combinations.
::
jason@io ~ pts sh -c "sort | awk '{ print \$1, \$2 * \$2 }'" foo
Any issues or bug reports, please use the github issue
`tracker <https://github.com/uxcn/sh-utils/issues>`_. Pull requests and patches
are also welcome.
Aliases
-------
Some useful aliases to avoid prompts and change the default suffix.
::
alias pm="pm -f -s .old"
alias cpm="cpm -f -s .old"
alias upm="upm -f -s .old"
Installing
----------
PyPI
pip install sh-utils
From source
python setup.py install
Versions
--------
0.9 (Feb, 2016)
* first release
''',
classifiers = ['Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'Topic :: System :: Archiving',
'Topic :: System :: Archiving :: Backup',
'Topic :: Software Development',
'Topic :: System :: Filesystems',
'Topic :: System :: Shells',
'Topic :: System :: System Shells',
'Natural Language :: English',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'License :: OSI Approved :: MIT License'],
author = 'Jason Schulz',
maintainer = 'Jason Schulz',
author_email = 'jason@schulz.name',
maintainer_email = 'jason@schulz.name',
keywords = 'shell path file directory helper swap pivot',
license = 'MIT',
scripts = ['pm', 'cpm', 'upm', 'sw', 'pt', 'pts'],
)