<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/3-terminal-commands-to-increase-your-productivity-jtm5jlgvo" -->

---
title: 3 Terminal Commands to Increase Your Productivity
description: Increase your productivity with these three terminal commands: creating aliases for commands, using pbcopy to copy file contents to the clipboard, and...
canonical: https://daily.dev/posts/3-terminal-commands-to-increase-your-productivity-jtm5jlgvo
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: 3 Terminal Commands to Increase Your Productivity | daily.dev
og:description: Increase your productivity with these three terminal commands: creating aliases for commands, using pbcopy to copy file contents to the clipboard, and...
og:url: https://daily.dev/posts/3-terminal-commands-to-increase-your-productivity-jtm5jlgvo
og:image: https://api.daily.dev/og/posts/Jtm5jlGvo.png
og:image:alt: 3 Terminal Commands to Increase Your Productivity
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 3 Terminal Commands to Increase Your Productivity

**[DEV](https://daily.dev/sources/devto)** · 4 min read · 300 upvotes · 18 comments

## Summary

Increase your productivity with these three terminal commands: creating aliases for commands, using pbcopy to copy file contents to the clipboard, and utilizing reverse search to find previously entered commands.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://dev.to/pankajgupta221b/3-terminal-commands-to-increase-your-productivity-57dm>

## Community discussion

Top comments from developers on daily.dev.

**@lukejans** · 17 upvotes

> Aliases can NOT accept parameters!!! Heres one of the commands that I modified so it actually works.
>
> zprofile:
> ```zsh
> # git commit functions
> gc() {
>   if [ -z "$1" ]; then
>     echo "Please provide a commit message."
>   else
>     git commit -m "$1"
>   fi
> }
> ```
>
> this can be executed like an alias:
> ```zsh
> $ gc "your commit message"
> ```

**@olikon** · 1 upvotes

> Thanks, first time to know that Vim has this easy encryption method, and after researching a little bit, the way to cancel the encryption is: using the :X again, and type and then confirm with an empty key value.

**@diegochicurel** · 1 upvotes

> Besides Ctr-R to back history search, I have this handy function. It's "History grep"
> ```
> hgr () {
> 	local cmd="history "
> 	for term in "$@"
> 	do
> 		cmd+=" | grep $term"
> 	done
> 	eval $cmd
> }
> ```
> Shortcut for doing something like `history | grep smth | grep smth_else ..`

**@eyoung** · 0 upvotes

> As typical it's `bash` focused... here are the PowerShell equivalents to look up.
>
> 1 Setting Alias
> > `PS Set-Alias...`
>
> 2 Set Clipboard
> > `PS Set-Clipboard`
>
> 3 Searching your PowerShell history, I've never done this but this looks useful: [here](https://serverfault.com/questions/891265/how-to-search-powershell-command-history-from-previous-sessions)

**@manuuelbayona** · 0 upvotes

> love it! thank you.

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 1 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments
- [CNCF Unveils Schedule for KubeCon \+ CloudNativeCon Europe 2026](https://daily.dev/posts/cncf-unveils-schedule-for-kubecon-cloudnativecon-europe-2026-ikhcoa5cb) · CNCF · 2 upvotes · 0 comments
- [CNCF Debuts KubeCon \+ CloudNativeCon Japan 2026 Schedule](https://daily.dev/posts/cncf-debuts-kubecon-cloudnativecon-japan-2026-schedule-xp5pyudub) · CNCF · 1 upvotes · 0 comments

---

Tags: [#data-science](https://daily.dev/tags/data-science), [#productivity](https://daily.dev/tags/productivity), [#vim](https://daily.dev/tags/vim)

[View this post on daily.dev](https://daily.dev/posts/3-terminal-commands-to-increase-your-productivity-jtm5jlgvo)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"3 Terminal Commands to Increase Your Productivity","url":"https://daily.dev/posts/3-terminal-commands-to-increase-your-productivity-jtm5jlgvo","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/3-terminal-commands-to-increase-your-productivity-jtm5jlgvo"},"datePublished":"2024-01-01T10:33:36.184Z","dateModified":"2024-01-01T10:33:34.224Z","description":"Increase your productivity with these three terminal commands: creating aliases for commands, using pbcopy to copy file contents to the clipboard, and...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/80e269b261df24e829427e0a659edcdd?_a=AQAEufR","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/80e269b261df24e829427e0a659edcdd?_a=AQAEufR","isAccessibleForFree":true,"articleSection":"DEV","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"DEV","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/devto","url":"https://daily.dev/sources/devto"},"commentCount":18,"discussionUrl":"https://daily.dev/posts/3-terminal-commands-to-increase-your-productivity-jtm5jlgvo","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":300},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":18}],"keywords":"data-science,productivity,vim","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"DEV","item":"https://daily.dev/sources/devto"},{"@type":"ListItem","position":3,"name":"3 Terminal Commands to Increase Your Productivity"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/3-terminal-commands-to-increase-your-productivity-jtm5jlgvo","comment":[{"@type":"Comment","text":"Aliases can NOT accept parameters!!! Heres one of the commands that I modified so it actually works.\nzprofile:\n# git commit functions\ngc() {\n  if [ -z &quot;$1&quot; ]; then\n    echo &quot;Please provide a commit message.&quot;\n  else\n    git commit -m &quot;$1&quot;\n  fi\n}\n\nthis can be executed like an alias:\n$ gc &quot;your commit message&quot;","datePublished":"2024-01-02T11:31:13.498Z","dateModified":"2024-02-05T19:31:29.230Z","url":"https://daily.dev/posts/Jtm5jlGvo#c-yDFxiBbZC","author":{"@type":"Person","name":"Luke Janssen","url":"https://daily.dev/lukejans","image":"https://media.daily.dev/image/upload/s--Nw82do-c--/f_auto/v1756863484/avatars/avatar_mb3lgNFUGOF15CUxBZZS8?_a=BAMClqZW0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":17}},{"@type":"Comment","text":"Thanks, first time to know that Vim has this easy encryption method, and after researching a little bit, the way to cancel the encryption is: using the :X again, and type and then confirm with an empty key value.","datePublished":"2024-01-06T05:53:58.898Z","url":"https://daily.dev/posts/Jtm5jlGvo#c-CiV4Asbb4","author":{"@type":"Person","name":"olikon","url":"https://daily.dev/olikon","image":"https://media.daily.dev/image/upload/s--rjmSXYwK--/f_auto/v1715487286/avatars/avatar_o3kYSMsaEBqkLtkK2hu3a"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"Besides Ctr-R to back history search, I have this handy function. It’s “History grep”\nhgr () {\n\tlocal cmd=&quot;history &quot;\n\tfor term in &quot;$@&quot;\n\tdo\n\t\tcmd+=&quot; | grep $term&quot;\n\tdone\n\teval $cmd\n}\n\nShortcut for doing something like history | grep smth | grep smth_else ..","datePublished":"2024-01-30T02:00:19.579Z","url":"https://daily.dev/posts/Jtm5jlGvo#c-mvDAolt4e","author":{"@type":"Person","name":"Diego Chicurel","url":"https://daily.dev/diegochicurel","image":"https://lh3.googleusercontent.com/a/ACg8ocI0XV4lsYIFMCLmubmxP0RpIdcSl6CG5C6Aujb7TZUm0kdd=s96-c"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"As typical it’s bash focused… here are the PowerShell equivalents to look up.\n1 Setting Alias\n\nPS Set-Alias...\n\n2 Set Clipboard\n\nPS Set-Clipboard\n\n3 Searching your PowerShell history, I’ve never done this but this looks useful: here","datePublished":"2024-01-18T17:41:41.508Z","url":"https://daily.dev/posts/Jtm5jlGvo#c-Kwhx23p6c","author":{"@type":"Person","name":"Evan Young","url":"https://daily.dev/eyoung","image":"https://media.daily.dev/image/upload/s--XunRJpDX--/f_auto/v1762793954/avatars/avatar_Vm1vw9EGTkV8xCvGaCMtP?_a=BAMAK+ZW0"}},{"@type":"Comment","text":"love it! thank you.","datePublished":"2024-02-28T00:05:59.558Z","url":"https://daily.dev/posts/Jtm5jlGvo#c-rVJQXE7IC","author":{"@type":"Person","name":"Manuel Bayona","url":"https://daily.dev/manuuelbayona","image":"https://media.daily.dev/image/upload/s--x7POXlqp--/f_auto/v1709078913/avatars/avatar_0IkKSlnNu3FDVfGG2D5m7"}}]}
```

