Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
Config_Files
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Maxime Bombar
Config_Files
Commits
96ada576
Commit
96ada576
authored
Jul 22, 2013
by
Valentin Samir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[bash_alias] Add notication alias for long commands
$ long_command; alert "long_command ended"
parent
d6834d42
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
.bash_aliases
.bash_aliases
+5
-0
No files found.
.bash_aliases
View file @
96ada576
...
...
@@ -112,6 +112,11 @@ alias pdfpages="find . -name '*.pdf' -exec pdfinfo {} \; | egrep '^Pages'"
# et pour les sommer
alias pdfpagessum='pdfpages | awk "{print \$2}" | paste -sd+ | bc'
# Add an "alert" alias for long running commands. Use like so:
# long_command; alert
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
# +------------+
# | Cool stuff |
...
...
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