Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [alias]

In computing, an alias is an alternate name for an object, such as a variable, file or device.

0
votes
0answers
29 views

Set up alias Gmail from a custom domain

I have a domain tsas.vn, I use Gmail for the mail service. I also have another free @Gmail account. Now I want to set up the free Gmail account to be an alias of the tsas.vn account. I somehow couldn'...
0
votes
1answer
30 views

Set up a shortcut to a folder with spaces and hyphens

Hi: I am a Mac OS X user and my work offers us Microsoft OneDrive. The problem is the path name for folders stored on the OneDrive has spaces and hyphens. Like this: ~/OneDrive - My University ...
4
votes
2answers
100 views

Space in doskey/alias for windows?

I try to run Laravel's Artisan command inside the (docker) container by defining a doskey alias. My idea was: php artisan=docker-compose exec apache php artisan $1 However it does not allow me to ...
3
votes
1answer
47 views

Alias for sudo then ssh

I am looking to write an alias for the following two command: sudo su - user ssh somewhere I've tried alias jump='sudo su - user; ssh ' and then use this as jump somewhere but this doesn't work....
3
votes
1answer
109 views

Dynamically creating aliases in PowerShell

I'd like to create some aliases dynamically but I can't get my code to work. Here's the code: # Drives $drives = ("a","b","c","d","e") foreach ($drive in $drives) { New-Item -Path alias:\ -Name $...
7
votes
1answer
607 views

bash / zsh alias: Can I grab the arguments and use within subshell?

I would like an alias that gives a directory listing in dictionary order with "." files first. It seems that one few ways to accomplish this devoid of writing my own script (which isn't a real problem)...
0
votes
1answer
116 views

Why does `source ~/.aliases` not work in .zshrc?

user@localhost ~ % zsh --version zsh 5.5.1 (x86_64-redhat-linux-gnu) me@localhost ~ % lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: Fedora Description: Fedora ...
0
votes
0answers
23 views

Wrap or proxy a system command to add a parameter

Can I use an alias or symlink, or otherwise wrap the OS X command fsck_hfs to always add a -c parameter (to allocate cache memory) when diskutil calls fsck_hfs? Since diskutil (and the GUI Disk ...
0
votes
2answers
182 views

Powershell console profile aliases (functions) not working, why?

This TechNet page says the location of a console profile file for the current user only and all shells shall be: %UserProfile%\Documents\Windows­PowerShell\profile.ps1 In my case, the %UserProfile% ...
0
votes
1answer
22 views

Where is the Alias Editor/Manager in Windows 7?

I'm reading some documentation that mentions it. It says the Alias Manager is found under Configuration in the Menu Bar, but the Menu Bar is not an option for me unfortunately. The search has also ...
0
votes
2answers
407 views

Adding more IPs to same network interface - Alias or not?

I'm using raspbian (kernel 4.1.19+): I want to setup the same network card on the latter to have two IPs (namely 192.168.1.9 and 10.0.0.1 on wlan0). My /etc/network/interfaces has sections: auto lo ...
0
votes
0answers
21 views

alias for a external drive in Linux <name+colon>

Is there a way to mount a external drive (/mnt/drive_c) and use an alias/name as "drive_c:" or "c:" (an alias) so you can issue commands like: ls -la drive_c: ls -la drive_c:/windows/system32
0
votes
1answer
85 views

How do I make . execute the last shell command in zsh?

In bash, alias .= "fc -s" works for this purpose, it does exactly what I want. But in zsh, using fc -s just outputs fc: bad option: -s. How do I make . execute the last shell command in zsh?
1
vote
1answer
142 views

When using SSH, the .bashrc alias on that server is not being read, even tough it is set correclty in .bash_profile and .bashrc

I use SSH to login to a remote machine. I can save the alias like so, in .bashrc: alias l='ls -lla' but when I logout and SSH in again, the alias does not exist. It is set properly, however, in ....
2
votes
1answer
705 views

Create aliases dynamically

I want to create aliases based on a command, its subcommands and its options. I'd like the alias to be the acronym of those components. This is simpler to explain with the real example: alias mc="...
1
vote
1answer
46 views

How does bash alias understand “$@”?

I am trying to write an alias to do 2 things $alias cde='cd "$@" && echo' but for some reason when I call it with $cde test test all that happens is it echos test: It looks like my ...
8
votes
2answers
1k views

Alias does not “override” PATH entries?

The last line of my .bash_profile is: alias cp=/usr/local/bin/gcp However that is being squashed by the entry in my $PATH : $which cp /bin/cp 11:54:32/OCspark $type cp cp is aliased to `/usr/local/...
1
vote
1answer
90 views

Alias not assigned correctly

I have a weird issue with a bash alias. I have the following alias defined in my .bashrc: alias rec='nano `ls slurm-* | sort -t. -k3n | tail -1`' However, when I expand the alias rec in the shell ...
0
votes
1answer
456 views

Why this PowerShell alias does not work?

I am learning PowerShell. I would like to understand why some aliases in PowerShell 5.0 under Windows 8.1 do not work. For instance, this command alone works: Get-WmiObject -Class Win32_WinSAT But ...
35
votes
1answer
4k views

How can I pass an alias to sudo?

I have tried putting my aliases in ~/.bash_profile, ~/.bashrc, /etc/profile, and /etc/bashrc. I am still unable to execute the following: alias zf2="php public/index.php" and then execute: sudo ...
-2
votes
1answer
32 views

Aliases in Bash shell

In the documentation regarding Aliases in Bash there is a statement: The first word of each simple command, if unquoted, is checked to see if it has an alias What is "simple command" and "first ...
0
votes
1answer
62 views

How to create custom alias for gnuwin32 tools in Windows Powershell

I have gnuwin32 installed and appended to my environment so I run linux/unix "ls" when I type ls in the command prompt. That's not a problem for Powershell, apparently, but I'm not being able to ...
0
votes
1answer
2k views

How can I add password of user as alias in bashrc file?

I have created alias for username and it works fine alias yb="ssh name@hostname" It works fine, but I also want to create alias for password, Can anyone help how can I do this?
0
votes
1answer
31 views

Netbeans detect javascript alias tag?

Netbeans will apply the appropriate formatting and parsing when it loads a .js file of detects <script> tags in the current .html or .php file I am working in. I am using Zend Framework 2 to ...
18
votes
1answer
4k views

Bash is slow to start because of this line in .bashrc. What could cause this?

My .bashrc file contains a line to this effect: alias prog="/path/to/script.sh $(find $(pwd) -name prog)" When I comment out this line, Bash starts almost instantly when I open a new terminal. With ...
4
votes
2answers
265 views

How can I make “and” be a working alias for && in Bash?

I want to be able to use and instead of && in Bash. I tried alias and=&& but the behavior is not the same. steven% echo 'hi' && echo 'bi' (git)-[yako.botrank-rate-limit-...
2
votes
1answer
3k views

How to set alias for python3 on OSX

I'm trying to set an alias for python3 so I can run it with python. Here's my current .bash_profile # Setting PATH for Python 3.6 # The original version is saved in .bash_profile.pysave PATH="/...
0
votes
1answer
47 views

How to proxify emails?

I'm running a store platform for which buyers coordinates are sensitive. In order to prevent sellers to store the buyers coordinates to be independent, I am looking for ways to alias phone numbers and ...
1
vote
0answers
71 views

Aliasing a binary in zsh

I have the following binary: ~/wren/wren This is an interpreter for a scripting language. Running it like: cd ~/wren ./wren myscript.wren will execute the script. I would like to create an alias ...
1
vote
1answer
810 views

Setting alias to use Macvim in terminal instead of standard Vim

I want to use MacVim console app instead of a standard vim. In order to accomplish that I try to set alias: alias vim="/usr/local/Cellar/macvim/8.0-119_1/MacVim.app/Contents/MacOS/Vim" But for some ...
0
votes
2answers
841 views

Setting up an alias for SSH command in Windows PowerShell

In Windows PowerShell: >ssh -i \Path\To\key.pem user@server.com Works like a champ. >Set-alias sshalias "ssh -i \Path\To\key.pem user@server.com" saves the alias with no errors. >sshalias ...
1
vote
1answer
61 views

How do I write a bash alias that replaces !$ with the previous command’s last word?

I have a script named cpodin that copies several build artifacts to another directory. Afterward, I edit SHA1SUM in the destination directory. For example: cpodin /foo/bar/baz vim !$/SHA1SUM How do ...
0
votes
3answers
137 views

Enable confirmation for rm command with force flag

Is there any option to enable confirmation for the rm -rf . We had an alias setup for rm=rm -i so whenever we delete a file it asks for confirmation but when -f flag is supplied it will not asks for ...
0
votes
2answers
994 views

How to alias a directory change in Powershell?

Why does Set-Alias foo "cd C:\foo\bar\xyz\asdf\etc" not work? foo -> invalid format How to do this correctly?
0
votes
0answers
77 views

Conemu Environment settings not being used / overridden

Using Conemu (latest stable) on Windows 7, and populating the environment settings with lots of handy aliases, among other things. Now when I start ConEmu64.exe directly, somehow it ignores the ...
-2
votes
1answer
38 views

make alias for program in another directory open file in current direcory

so my eclipse ide isn't known to bash but located in /home/georg/Desktop/eclipse If I want to open a .c file in say /home/georg/Desktop/myprograms/helloworld.c how can i write the alias, ie. alias=...
0
votes
0answers
67 views

make zsh tab complete after `alias vim=“vim && clear”`?

I wanted to clear my terminal when exiting vim, because I kept switching through screen terminals and seeing old exited vim windows. # .zshrc alias vim="/usr/local/Cellar/vim/8.0.0094/bin/vim &&...
0
votes
1answer
120 views

Not able to show help for flags of a command in PowerShell

I'm a verbose person so I usually create a new directory without using aliases like this. New-Item Donkey -ItemType d A less verbose colleague nagged about it and, since I'm such a pleasure and ...
0
votes
1answer
946 views

zsh alias - command not found: “open or ”cd

While trying to create aliases in zsh, I end up getting a response of zsh: command not found: “open from the alias in .zshrc alias plex=“open -a Plex\ Media\ Server” Using single quotes gives the ...
2
votes
2answers
6k views

Create permanent DOSKEY in Windows cmd

I think the title is pretty self explanatory. The question is how can I create an alias in a Windows cmd that will also work after I close and then reopen it. For example I would like an alias ...
0
votes
1answer
57 views

Alias that SSH into a VM and Execute a Script

In my ~/.bash_profile on my Mac, I created an alias: alias ssh_retish='ssh -Y root@172.19.242.35; cd /root/Bitbucket_DTH; ./dth -k MDU_SSC_014 -p pink1 -z' Goal is to run that alias to : ssh into ...
3
votes
3answers
3k views

Docker exec doesn't load aliases

I have a bash alias loaded into a Docker container, in /etc/bash.bashrc. It functions as a shortcut to a commandline PHP script. This is convenient, since anyone can use that alias directly after one ...
1
vote
1answer
37 views

Creating aliases beginning with + or -

Most of the times, I find that I'm doing: % chmod +x <file> #or +r or +w So, I thought about creating an alias such that: % alias +x='chmod +x' # or % alias \+x='chmod +x' # or % alias '+x'='...
1
vote
2answers
413 views

need to source bash_profile in each new iterm window

I am on macbook pro, el capitan. I have aliases set in .bash_profile, which work in the first instance of iTerm, however they are not recognized if I open a new iTerm instance, I have to do source ~/....
1
vote
3answers
5k views

How to create domain “alias” for entire url?

I have set up a DNS server for local use in a LAN. This server can resolve IP addresses, so when I ping mypc.company I get a successful reply from the IP address 192.168.1.34. Problem I have ...
1
vote
0answers
443 views

httpd 2.4 returning forbidden message when using alias

As a part of displaying a live log file, I managed to setup and deploy an httpd server on fedora 19. For accessing the log files that are outside the www folder, I created aliases, so that when test ...
0
votes
1answer
640 views

Find the location of an alias definition

I can find the location of a function definition, but this doesn't work for aliases: $ type -a subl subl is an alias for /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl subl is /...
1
vote
1answer
316 views

Screen does not read /etc/profile.d on startup

Whenever I start screen, my alias definitions in /etc/profile.d are missing within screen. How can I make screen read/source all files in /etc/profile.d/ on startup?
2
votes
1answer
306 views

How to run aliases under tmux without root privilege

Under terminal multiplexer tmux I am unable to use alias as a normal user. alias l='ls -CF' alias la='ls -A' alias ll='ls -alF' alias ls='ls --color=auto' For alias of alias l I have to type ls -CF ...
1
vote
0answers
47 views

Suffix Aliases feature in powershell

I'm looking for ability to run certain cmdlets when calling files with some extensions. For example, when calling PS> .\test.php I want to call Invoke-Php .\test.php. Something like suffix aliases ...