Skip to main content

All Questions

3 votes
2 answers
287 views

how to alias the `history` function in fish shell

I'm trying to set the fish history pager to be bat -l fish for syntax highlighting. (i.e. set the PAGER environment variable bat -l fish just for the history command). I tried: # 1: alias history &...
matan h's user avatar
  • 147
1 vote
1 answer
263 views

fish shell: universal variables and alias not shared between "contexts"

I use fish shell mainly from Rider IDE and iTerm2. I've noticed that every task that implies saving something for future sessions will not operate transparently between the two aforementioned contexts....
Lord of the Goo's user avatar
1 vote
2 answers
109 views

like history and fc but for a personalized list of useful commands

I have spent a few hours trying to get an easy access to my most useful commands I have to use in a certain environment, I have the "incredible" idea of using history for that purpose, to ...
JustLolo's user avatar
0 votes
1 answer
543 views

How to set environment variables automatically?

So I do research in machine learning and use a remote GPU server to do the stuff. What I usually do when I come to work is access the server with an SSH client and run my alias hi command which is: ...
Sean's user avatar
  • 181
2 votes
3 answers
4k views

How can I dynamically change a path in my aliases?

I have a bunch of aliases in my .cshrc file which use the path: /projects/project_name/my_name/$CLIENT I've written a short script which is intended to take a folder name from my working directory ...
tombam95's user avatar
  • 121
20 votes
3 answers
39k views

How to create an environment variable that is the output of a command

How do I create an environment variable that is the result of a specific command? Specifically, I want an environment variable ($BWD) that is the basename of $PWD $ cd /home/devel/Autils/lib $ echo $...
Josh's user avatar
  • 321
0 votes
2 answers
714 views

How do I put an argument into the BROWSER variable?

I like to be able to do export BROWSER="lynx -cfg=~/.lynx.cfg". I tried this directly, and I also tried setting an alias alias lynx="lynx -cfg=~/.lynx.cfg", but these didn't work. (Meaning that tools ...
HappyFace's user avatar
  • 1,620
0 votes
1 answer
1k views

ssh preserve environment

I want to send a command to a client server ssh <client-machine> command However, command is an alias defined on the machine sending the command. Also I use variables in the command script ...
Martin's user avatar
  • 35
1 vote
1 answer
2k views

alias for date-stamping to create a directory(in .bashrc) [duplicate]

I am trying to create an alias in .bashrc to time-stamp a directory. Obviously, it's not working out too well for me. For example: under .bashrc alias testit="export testor=$(date +%d);mkdir ~/...
user231192's user avatar
11 votes
1 answer
9k views

How to save an alias of an eval $(other_comand) command

I've been using docker for a while and there's a command I write each time I boot up my docker: eval $(docker-machine env) I know eval shouldn't be used unless necessary, but it's mentioned by the ...
GabLeRoux's user avatar
  • 955
2 votes
1 answer
1k views

Can I use an environment variable to define an alias?

I'm using an automation engine to run perl scripts. script_X requires a wrapper script so it's run like: wrapper_script script_X --parameters But the automation engine can't understand that ...
ponytailPalm's user avatar
2 votes
1 answer
3k views

How can I add default command line parameters to an executable in a way that will also work on GUI apps? [duplicate]

I want to pass a command line program by default when I run it. myprog --foo=bar The solution I could think of was to add a custom "myprog" wrapper to my "bin" folder #! /bin/sh /usr/bin/myprog --...
hugomg's user avatar
  • 5,827
0 votes
1 answer
538 views

make custom commands on android 4.4.2

I want to program and debug in my android phone. To do that I downloaded c4droid and it's gcc plugin. after a lot of tries I understood that gcc is in directory /data/data/com.n0n3m4.droidc/files/gcc/...
Yagel's user avatar
  • 1
12 votes
4 answers
6k views

How can I make shell aliases available when shelling out from Vim?

In my .zshrc, I declare some aliases. Eg, which dbstart shows the contents of that alias. If I open vim from that shell, it is a child process. In Vim, I can run shell commands with :! some_command. ...
Nathan Long's user avatar
  • 1,643
5 votes
3 answers
1k views

For a same unix or linux user, different sets of environment variables

I'm using tcsh, and for a specific project every member of my team connects to a server with the same user. (This is something we cannot change). The situation arises because I want to have some ...
nozimica's user avatar
  • 884

15 30 50 per page